Is it possible to get USER_ACCESS_TOKEN via graph API? how? - facebook-graph-api

My main reason is to get PAGE_ACCESS_TOKEN from one user via graph API. So do I have to get USER_ACCESS_TOKEN to do that? Also I wonder if there's a way to store PAGE_ACCESS_TOKEN without expired.
Thanks.

Related

Is there a way to make a Google Place Photos API request without exposing the API Key?

I'm making a web-app where I need to make a request to the Google Places API, this is all good but I also need to make a request to the Places Photo API to display the images of the stuff I find using the places API. To do this, you need to make a request like this:
https://maps.googleapis.com/maps/api/place/photo?parameters
Where one of mandatory parameters is your API Key. I'm using Django and I'm passing a dictionary that has all the info I need to display. However, in the frontend you can see the API Key in the URL of the image. Is there any way I can avoid that?
Thank you so much!
You cannot avoid using an API key. All calls to the Maps APIs need to pass an API key to be able to work.
However, you can secure your API keys with restrictions.
You may follow these instructions to restrict your API key for Place Photos use.
Hope this answers your concern.
The Places API is a server API and can not be restricted by referrer. If you try then you get a 403 response to every request. You can't use it client side with an IP restriction, so the only restriction available is to limit it to the places API. This is not ideal since some of the places API calls are chargeable.

Facebook Graph API to find connectness

Is there a way to find out how two arbitrary users are connected (n-degree connectedness) using the current Facebook graph API?
If that is not possible, is it possible to find a connected chain from me to an arbitrary user?
No, there is no way to get a connected chain with the API. The only thing that is possible is to check if you (= the authorized user) are friends with another user who is using the App too. And you would need to authorize users with user_friends, of course.
You can call /me/friends and see if the other user is in there.

Use of __after_id in facebook graph API calls

What is the use of __after_id in graph API urls?
I thought its an alternative to offset.
But some experimentation shows that __after_id doesn't have any role to play.
Anyone?

Facebook: Graph 'posts' works but FQL 'stream' does not?

this shouldn't be this difficult. I assumed it was a permission thing, but then it doesn't make sense when the graph API gives me the information but the FQL doesn't. :S
so I'm just trying to get the stream from my public page:
http://www.facebook.com/207941570907
So I'm using their tool:
https://developers.facebook.com/tools/explorer
And I give the Graph API Explorer every single permission and I run this:
https://graph.facebook.com/207941570907/posts
And that works perfectly.. but I want to use FQL instead. So I figure running the following would be EXACTLY the same, but no data appears?! It WAS working a month ago, but I don't know what they changed.. sigh:
https://graph.facebook.com/fql?q=SELECT post_id, message FROM stream WHERE source_id = 207941570907
Does anyone have a clue what I'm doing wrong?
I was able to get, using the graph API explorer, the posts from pages I admin. I currently have all permissions for the access token I'm using.
Using the Graph API Explorer tool, I'd suggest looking thru the permissions to see which one you are missing. Or start with all permissions and start taking one by one off until it breaks.

Facebook Page - Get Post feedback and impression via Graph API

I'm trying to get some insights on a list of Posts by a Page on Facebook.
To be specific, I want to get the information highlighted in this blog post via the API.
But I can't figure out how, anyone knows how?
As far as I know it's only possible using the "stream" table. So you've got to use FQL to query this data. Using this technique you'll only get the impressions directly. Feedback rate can be calculated by adding #comments and #likes and dividing the result by #impressions. Hope they'll add this to the insights graph api as well.
MartinHN
Refer to https://developers.facebook.com/docs/reference/api/#analytics
If you are trying to aggregate multiple pages or a page other than the requesting app then you may need grant read_insights permissions to your application.
Refer to http://developers.facebook.com/docs/reference/api/insights/