How do you query facebook's graph api via the javascript sdk for users that have allready given you permissions (offline access) and whose auth data you have stored, but who are not currently logged in to facebook?
To answer my question, you can in fact do so. You can use FB.api calls and include the access token at the end of the URL with ?access_token=
I'm not 100% sure of the code you'd need to actually do it, but I think one of the key elements to this would be logging in to the SDK as an application, rather than a Facebook User, as detailed in the documentation # http://developers.facebook.com/docs/authentication
Have you got an example query that you'd like to make with the SDK?
Related
In the past, I think a Facebook Page access token could be generated manually, and then used with the graph API to query posts, comments, likes, shares, etc. Now it seems you cannot query anything without developing an app that I login to and then in turn the app generates the access token. Is that true? For example, this question from 2015 claims no access token is needed for public data, but when I try their example it returns "An access token is required to request this resource."
I'm the admin of my page that ran a basic contest (giveaway). I'd like to use the graph API to fetch the names of people that liked, shared, or commented on a post. Then I want to cross reference it with those that like the page. Do I have to register and develop an app for this? Does my page have an access token available without going through the app registration and review process?
Can I access a Facebook Page with the Graph API without creating an app?
No, that is not possible. You always have to use an App for any API Access.
Then I want to cross reference it with those that like the page.
That is not possible either, not even with an App. I assume you want to make sure that participants like your Page - which is not allowed. People cannot be "incentivized" to like your Page.
Platform Policy: https://developers.facebook.com/policy/
Explanation about the specific rule against requiring people to like your Page: https://developers.facebook.com/docs/apps/examples-platform-policy-4.5
Just starting out with Facebook's API. I have a client that sends me the access_token after logging into to FB on iPhone. I am wondering where I would specify the permissions I need, for example to access email, or user's music data?
Is it via client using FBSession, or via Koala (ruby gem I use on server side with access_token to get user's info) or in Facebook's app settings page?
Thanks
If your user is logging in via an iOS app, you need to request them in the permissions parameter of FBSession. https://developers.facebook.com/docs/reference/ios/3.1/class/FBSession#permissions
Although I'm not a specialist in mobile development, so I cannot provide you with a functional example (or even properly explain how to do this) I have done a bit of browsing in the Facebook API section of the Developers website, and I believe that I have the answer to your questions. This will not only answer where, but it should also give you how, for many different purposes, there are different permissions that you must add, and this page gives you some idea of how to do all of them.
http://developers.facebook.com/docs/reference/login/
I am trying to build a cross browser extension with Crossrider which fetches the Facebook Stream and shows it on Google+.
Everything is set, the Facebook App, the connect itself, but the only missing piece in the puzzle is "stream.get" which I can't find how to call this API method with the JS SDK.
Is this possible at all ?
Thanks!
You can access https://graph.facebook.com/me/feed with an access token with the javascript api which is the graph replacement for stream.get. You could also run a FQL query against the stream table. Both I believe would need "read_stream" extended permission.
Can I use the Facebook Graph API without the creation of my Facebook Application? As I understand it, for each operation I need to use the OAuth key. And I can only get user OAuth key if they authorize my Facebook application. Am I right?
I need to get user feed, and post to it.
Facebook Graph Api needs your APP ID which you can only get from your Facebook application. So i think its not possible to post data on facebook without having Application ID.
You can use this tool to dynamically generate an access_token for testing: https://developers.facebook.com/tools/explorer/
Also, check out RapidAPI here. I've specifically linked you to the FacebookGraphAPI block. Here you can instantaneously connect to numerous Facebook endpoints. The platform will generate a code snippet that you can directly insert into your code.
Depends on what you want to do, for most tasks you have to have an app id... but If you want to get the amount of shares for a certain page, for example, you can do it with no app ID.
I think there is FBML (facebooks mark up language) which you can embed on your site which can handle some basic tasks like commenting or liking.
No, You can't do that as Facebook Graph API needs access token which u can get only by authorising your logged-in user by your (Created) App in Facebook.
I'm working on a canvas app and am using the Graph api. There used to be in the REST api a post_authorize_redirect_url for a place to land someone after they first authorize your app (see here for http://developers.facebook.com/docs/appproperties/ ). Is there an analagous concept in current canvas app?
thx
With the Graph API, you use the redirect_uri parameter. For example:
http://www.facebook.com/dialog/oauth/?response_type=code&redirect_uri={URL}&scope=email&client_id=12345
Details available here: http://developers.facebook.com/docs/authentication/
There is not (anymore). You'll need to track yourself if the user has just authorized or is a returning user. Just check your database for the user id, which you are allowed to store. Of course you'll need to store the id at some point of your app.