facebook-access-token

How get Facebook token using Oauth2 with chrome.identity

不羁岁月 提交于 2019-11-30 07:28:50
I'm using chrome.identity in a packaged app to get a user token using Facebook. I call chrome.identity.launchWebAuthFlow, and I need to take the access token, send it to the server, and then access token is used to verify the user. Works great with Google+. But for some reason, it doesn't work for Facebook. For some reason, Facebook's OAuth appears to be special. I've added the extensionid.chromiumapp.org to the list of redirect URLs in the API. Added "https://extensionid.chromiumapp.org/*", "https://facebook.com/*", "https://www.facebook.com/dialog/", "https://graph.facebook.com/*" to

Extending expiry date of facebook access token in graph api beyond 2 months

爱⌒轻易说出口 提交于 2019-11-30 05:18:19
I am working on facebook page wallpost automation using python I have automated posting on a fb page that i own by using facebook graph api post So i do this by sending a HTTP POST request to https://graph.facebook.com/mypagename/feed with access_token and message as POST paramaters I generate the access token by using graph api explorer by selecting my app that i am using and giving it permission to manage my pages Intitially the access_token use to expire in 2 hours To extend the expiry date to 2 months i send HTTP GET request to this url https://graph.facebook.com/oauth/access_token?client

How do I get a page Access Token that does not expire?

早过忘川 提交于 2019-11-30 02:15:48
I would like to know if it is possible to have an access token that never expires for post to my page Now I get the access token with: https://graph.facebook.com/me/accounts I have publish_stream and manage_pages permission, but using the Access Token Debugger I see that the token expires in about 1 hour. Is there a way to never expires? See facebook developers : By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire for pages that a user manages. So, you have to exchange your initial shortlived token for a

Is it possible to extend Facebook tokens with extendAccessTokenIfNeeded in an Android app?

吃可爱长大的小学妹 提交于 2019-11-30 00:36:53
I think this might effect a lot of Facebook/Android developers and yet there does not seem to be that much discussion on the topic... My question Has anyone successfully refreshed a token using the extendAccessTokenIfNeeded function? If you did have success, what version was the device (or emulator) running? Background I received an email from Facebook saying the offline_access permission will be deprecated from May 1st 2012 and Facebook recommended upgrading to their latest SDK. Fine. I upgraded to the latest SDK, the official Facebook app is installed on my device and (eventually!) Single

New Facebook SDK and OAuthException in Graphpath requests

断了今生、忘了曾经 提交于 2019-11-29 15:44:49
问题 I saw a buch of answers regarding this problem with the older versions of the SDK, and I can't seem figure out why this is happening to me. if I use this code, it works perfectly: String QUERY = "select uid, name, pic_square, is_app_user from user where uid in (select uid2 from friend where uid1 = me())"; protected void getFacbookFirends() { Bundle params = new Bundle(); params.putString("q", QUERY); final Request req = new Request(getSession(), "/fql", params, HttpMethod.GET, fbCallback);

Is there an API equivalent of the Facebook Access Token linter/debugger?

余生颓废 提交于 2019-11-29 08:18:25
问题 Is there a graph API equivalent of the Facebook Access Token linter/debugger that I can call programmatically? The linter is nice. It tells you all sorts of cool information about the token you have, such as the permissions granted (available to me via me/permissions ), the issue and expiration dates, the App ID, App name, profile Id, User Id, User Name, if it is valid (available to me if I try to call /me and watch for the exception returned), and the origin. App ID: APP ID : APP NAME

How do I get a page Access Token that does not expire?

北战南征 提交于 2019-11-28 23:10:28
问题 I would like to know if it is possible to have an access token that never expires for post to my page Now I get the access token with: https://graph.facebook.com/me/accounts I have publish_stream and manage_pages permission, but using the Access Token Debugger I see that the token expires in about 1 hour. Is there a way to never expires? 回答1: See facebook developers: By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do

Facebook PHP SDK 5 :: API 2.4 :: Cross-site request forgery validation failed. Required param “state” missing

懵懂的女人 提交于 2019-11-28 21:34:13
I did a very simple PHP script, just to try to login via Facebook and get an accessToken. But when I try the following code, I get an Exception from the SDK : « Cross-site request forgery validation failed. Required param "state" missing. ». Here is my code : require_once __DIR__ . '/facebook-sdk-v5/autoload.php'; session_start(); $fb = new Facebook\Facebook([ 'app_id' => '{my-own-app-id}', 'app_secret' => '{my-own-app-secret}' ]); // Check to see if we already have an accessToken ? if (isset($_SESSION['facebook_access_token'] )) { $accessToken = $_SESSION['facebook_access_token']; echo

How to get user access token?

六眼飞鱼酱① 提交于 2019-11-28 18:57:43
I'm trying to access scores through the Facebook API to get a list of scores of my friends. When I try to access /[facebook id]/scores , I get the following error even with my app access token: FacebookApiException [ 0 ]: A user access token is required to request this resource. ~ APPPATH/classes/basefacebook.php [ 1039 ] How do I get a user access token? Updated: After reading http://developers.facebook.com/docs/reference/api/permissions/ , I've confirmed that the app access token and user access token are two different access tokens. The question still remains, how do I get a user access

How should a client pass a facebook access token to the server?

若如初见. 提交于 2019-11-28 18:38:10
On every call to my REST API, I require clients to pass user's facebook access token, which authenticates the user. What's best practice for passing this token? maybe as a parameter behind the HTTP question mark GET /api/users/123/profile?access_token=pq8pgHWX95bLZCML or somehow in the header of the request, similarly to HTTP basic authentication maybe a third option? (I've excluded passing it in a JSON because I want the token get passed in GET calls as well, so JSON wouldn't fit there I think) If you look at the API endpoints provided by all popular OAuth providers (Google, Facebook, Pocket,