Getting a thumbnail from a Bing News result using Bing News Search API - bing

I am trying to get a thumbnail from an object that is returned using the Bing News Search API. The only helpful attribute of the returned object that I can think of in this problem is the url. Is there any easy way of using this url to get the thumbnail for the article?

Use the url Bing Search gives you back to make a curl call to the url and get the image from the page's OGP data. Several libraries are available in multiple programming languages to parse a webpage's OGP data.

Related

Using Facebook Graph to get URL of Cover Photo

I used to be able to get the URL of the cover photo using me?fields=cover
However, it does not seem to show the URL anymore.
https://developers.facebook.com/docs/graph-api/changelog/version3.0
According to the changelog, the cover field is deprecated and will not work anymore in Apps with Graph API v3.0+.

Bing image search APIs give different result that Bing Image web search page

I am using the bing image search APIs (endpoint: https://api.cognitive.microsoft.com/bing/v7.0/images/search). Using this endpoint the results are different than what I am seeing on the bing image search website (https://www.bing.com/images/).
Do we know how I can get the same results using the APIs and the bing search website?
This is expected as bing.com consumes a lot of other information (with user's permission) such as session id, browser, form factor, etc. In API, all this info is optional and hence response may vary. Ideally, you can get very close to results on bing.com/images/ but replicating exactly is difficult.

Official Facebook RSS feed for a Page

Many people have described how to obtain the RSS data feed for a Facebook page.
For example: http://ahrengot.com/tutorials/facebook-rss-feed/
The following URL provides the feed for Coca-Cola's page:
http://www.facebook.com/feeds/page.php?format=rss20&id=40796308305
However, I cannot seem to find any documentation on facebook.com that describes this interface. Does anyone know if this interface is officially supported by Facebook? I don't want to reference it in my code only to have it dropped unexpectedly by Facebook.
I know I could use the Graph API 'posts' method of the 'page' object to obtain similar data, but that requires SSL and an access token, which I would like to avoid if possible.
Facebook have changed its implementation to get facebook page RSS Feed
Following steps to get Facebook RSS Feed
Create facebook App link
From the above App you will get client_id and client_secret and then call this url
https://graph.facebook.com/oauth/access_token?client_id=client_id_value&client_secret=client_secret_value&grant_type=client_credentials
Replace client_id_value and client_secret_value with its actual value
From the above url, you will get assess token, Pass this token in below url to get page RSS Feed
https://graph.facebook.com/v2.2/1242433444/feed?access_token=access_token_value
here 1242433444 is facebook page id
Seems like Facebook prefers JSON over RSS. They support both formats to date, but JSON will likely outlive RSS. I've created some code samples for how to parse the JSON feed with PHP if you're interested:
http://liljosh.com/facebook-page-json-rss-feed/
No access token is required if the page is published (step one in the link above).
You shouldn't rely on the RSS feed feature.
Your best approach for machine readable data is to query the statuses connection, eg https://graph.facebook.com/facebook/statuses?access_token=<ACCESS_TOKEN>.
You can then parse the JSON and output it as RSS.

RSS format for events from facebook page

I was successfully able to get the RSS feed of a page in FB using this URL.
https://facebook.com/feeds/page.php?id=PAGE_ID_HERE&format=rss20
It returns values in RSS format. Then using regular NSXMLParser methods or some so parsing protocols, I was able to parse them.But unfortunately it returns all the details of the page, such as Events, notes and etc.
I would like to get the events only. It is stated here, we can achieve it using Graph API once we obtain the general access token. My question is, can't we simply get the RSS feed for events in facebook page like the URL above? Please advise. Thank you.
It looks like the FB API and all RESTful methods of accessing data from Facebook are being retired in favour of the Graph API and FQL, whichever you prefer.
The Graph API way is to parse the JSON returned by:
https://graph.facebook.com/PAGE_ID/events?access_token=TOKEN_HERE
After skim-reading the FQL docs, I can't find a way to do it using that. So, it looks like your best hope lies with the Graph API.
I would really like to know how to do this. We have a facebook page and have a livestream from this page on our website. Now we would like to have a list of events from the facebook page in the website as well. Is it posible at all?

Show tagged images from facebook on website?

I am trying to achieve similar functionality to the one shown here...http://blackmilkclothing.com/collections/leggings/products/circuit-board-grey-leggings
there fan page https://www.facebook.com/blackmilkclothing allows people to hash tag a photo and then populate it on their website like the link above.
Loading a series of tagged images from my facebook fan page to my website. I am not positive how this is acheived? I am assuming some kind of api process but any help in the right direction would be appreciated.
Thanks! All help is appreciated
See the 'tagged' connection of a Page in the Graph API: https://developers.facebook.com/docs/reference/api/page/
It returns a list of objects the page is tagged in, including photos
If you need background knowledge I suggest these links in particular:
Graph API overview: https://developers.facebook.com/docs/reference/api/
Page login: https://developers.facebook.com/docs/authentication/pages/
After a good bit of trial and error I've found the most efficient way to query photos tagged to a particular Facebook page is to use Facebook's FQL interface to retrieve a list of stream posts.
With FQL you can limit the queried objects to only those posts containing images (unlike with the higher-level Graph API calls which will return all posts, many of which may not have associated photos), and you'll also have more granular control over composition of the result set.
Keep in mind that Facebook doesn't have true hashtag support (only Facebook pages can be tagged), so to simulate the hashtag support that Black Milk Clothing encourages, you'll need to parse and filter the photo message text yourself.
As an alternative quick and easy solution, I've rolled the results of my efforts into a free online service called TagTray -- with TagTray I've added an interface for building and curating hashtag based galleries from Facebook, Instagram, and TwitPic (including application-level Facebook hashtag filtering) that can be framelessly embedded into a site with a few lines of JavaScript.