An Example of retrieving data from Url using Akka-HTTP and Open Graph protocol in Scala


Hello All,

In this blog we are using Akka-HTTP and Open Graph protocol to retrieve data from Url.

Open Graph protocol

The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.

While many different technologies and schemas exist and could be combined together, there isn’t a single technology which provides enough information to richly represent any web page within the social graph.

With the help of Open Graph protocol and Akka-HTTP i developed a mini project which can retrieve data from an URL like

1. https://www.youtube.com/

2. https://soundcloud.com/stream

You can find complete code here.

build.sbt file of the project contains all dependency.

build

UrlMetaDataActor.scala file to get the data from URL

opengraph

Example to retrieving data from Url.

result

Resources

Open Graph protocol

Akka HTTP

Thanks !!!

Advertisements
This entry was posted in Scala. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s