Facepile with graph api - api

I want to display the list of the user's friends who made an Open Graph action, like cooking. I can do this with Facepile, but how can I do this with the Graph API in order to control how it's displayed?
I can't find the corresponding Graph API call. Is there a simple way in order to avoid multiple Graph API calls?

Facebook should make api for that, but there is not way currently. I asked the technical support in facebook.com for that. They have a plan to implemente in FQL, but not yet.
So, facepile is only way until now. Check http://developers.facebook.com/docs/reference/plugins/facepile/ and check other type of codes like javascript SDK or iframe.

Related

How to call Google NLP Api from a Google Chrome extension

My aim is to select some text from a web page, start a google chrome extension and give the text to a google cloud api (Natural Language API) in my case.
I want to do some sentimental analysis and then get back the result to mark/ highlight positive sentences in green and negative ones in red.
I am new to this and do not know how to start.
The extension consists of manifest, popup etc. How should I call an API from there that does Natural Language Processing?
Should I create a Google Cloud Application with an API_KEY to call? In that case I would have to upload my credentials right?
Sorry sounds a bit confusing I know but I just don't know how I can bring this 2 things together an would be more than happy about any help
The best way to authenticate your app will depend on the specific needs and use cases of your application. You can see an overview of all the different methods here.
If you are not planning on identifying users nor on using a back end server that handles authenticating (as I assume to be your case), the best option would indeed be to use API keys. They do not identify the user, but are enough for the Natural Language APIs.
To do this you will need to create an API key for the services you want and add the necessary restrictions to make the key as secure as possible. Detailed instructions on how to do this and how to use the key in a url can be found here.
The API call could be made from within the Chrome extension with any JavaScript method capable of performing POST requests. For example using XMLHttpRequest or the Fetch API. You can find an example of the parameters that need to be included in the request here.
You may run into CORS issues when making the request directly from the extension. I recommend reading this answer, where a couple of workarounds for these issues are suggested.

Knowledge graph API returning different results than site

When I Google for something and click on a heading from the Knowledge Graph, Google displays a list of the results just below the search bar:
Screenshot here
I typed in the same thing in my Knowledge Graph API:
https://kgsearch.googleapis.com/v1/entities:search?query=apple%20products&key=[MY_KEY]&indent=True&limit=100
and the results are not the same. Short of scraping, is there a way of obtaining the exact list shown within the results via a Google API? It doesn't seem to be Knowledge Graph, or at least the queries are not the same.
Short of scraping, is there a way of obtaining the exact list shown
within the results via a Google API? It doesn't seem to be Knowledge
Graph
Apparently not, you are using the correct API but unfortunately that is how the API works—it usually gives you a different result than if you do a simple Google search.
Why this is the case—I don't know. I decided scrape google instead.
The Knowledge Graph API doesn't have access to the same data sources as a simple Google search. You can read about here if interested (https://web.archive.org/web/20130329151128/http://zecblog.com/2012/09/16/the-short-life-of-the-open-knowledge-graph/).
But yes in short, you'll have to do your own scraping if you want the same information, although it's difficult because Google purposely obfuscates the HTML tags.

photos of people you follow instagram api

How can I get a feed of photos/videos from people I follow from the Instagram API? This seems like a pretty basic API feed that it appears to be missing. I see where I can get a list of the people I am following, but them am I supposed to make separate API calls for each of those user feeds and aggregate all of those together?
http://instagram.com/developer/endpoints/relationships/#get_users_follows
I'm wondering how a service like http://web.stagram.com/ does something like this. I'm assuming aggregation, but perhaps I am missing something in the API.
The /user/self/feed endpoint returns all videos and photos of the user associated with the given access token. See here: http://instagram.com/developer/endpoints/users/#get_users_feed
This is an example of using this endpoint: https://api.instagram.com/v1/users/self/feed?access_token=969629.f59def8.24f8add8d4d7475397ab09b361299665
The Instagram API does not support what you are attempting. You would need aggregate these yourself. Not sure if webstagram has special access or has to work around this as well.

What is the best way to get an image URL from a certain query?

I have a book recommendation project for school, and I want to add a picture for each book. I was thinking I could use a search engine API to return the first result, but I'm having trouble with them:
The Google .NET Api seems to be unsupported
The Bing API
The Flickr Api is well documented and it actually works, but the images on there aren't what I'm looking for
Have you tried http://jpg.to ?
[searchterm].jpg.to
i.e.
http://programmingfordummies.jpg.to/
http://clockworkorange.jpg.to/
http://fantasticmrfox.jpg.to/

How to get user picture using Asana API?

I am trying to display user picture using Asana API, nut the /users/id service just return id, mail, name, workspaces. How can I?
Thanks
(I work at Asana)
The API does not currently provide access to the user profile photo. It is something we are considering adding in the future, but I can't provide any specifics on the timeline.
Until the API provides access to the photo, a useful workaround that we've been using is to get the user's email address out of Asana and then try to pull a picture from Gravatar. Obviously it requires the users to have registered at Gravatar, and they might have different pictures than what it is in Asana... but it's good enough for many situations.
(I work at Asana, too)
We recently added the ability to fetch (but not change) the user's photo. Check out the updated documentation (specifically the "photo" attribute of the user model is what you're looking for).