facebook-access-token

Get long term access token for Facebook page

北慕城南 提交于 2019-12-29 02:07:12
问题 I'm using Jquery Facebook Wall to retrieve the latest status of a Facebook page and show it in a website. (function($) { $(document).ready(function(){ $('#facebook_wall').facebook_wall({ id: '560124337XXXXX', access_token: 'CXGXhXZA7Wg2XXDcTi7WmX1wp71u5fNXXa9XXX3LmXXx', limit: 1 }); }); })(jQuery); // ... When I use FB Graph API Explorer to get the access token of the page, I get one that expire in only 60 minutes. Is there a way to get a long duration access token ? Or to generate a new one

Login with Facebook, grab access token

亡梦爱人 提交于 2019-12-24 19:17:46
问题 I just need to login to Facebook and print/store the Access Token given in the Oauth response. I'm using the following code to initiate login: <script> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9&appId=ID_REDACTED"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-login-button"

Facebook Graph Batch, only takes top-level access_token

孤人 提交于 2019-12-24 15:37:43
问题 I'm using the Facebook Graph Batch API to send one message / different messages to registered people's FB walls. I'm defining an access_token for each user, and the obliged top-level access_token (used as fallback, according to the doc). For the latter I just use an access_token from the users listed in the batch. The thing is that the only user recieving the message, is the one who's access_token I used as the top-level/fallback access_token. The other users get the "(#210) User not visible"

How to build a Facebook app with PHP that shows albums?

偶尔善良 提交于 2019-12-24 10:58:22
问题 I want to build a Facebook web application that uses the graph API to show only the albums of a specific user. That user is always the same, and I know his credentials. My code so far: $this->facebook->api("username/albums?access_token=" . $this->access_token); But I get the following exception: [error] => Array ( [message] => A user access token is required to request this resource. [type] => OAuthException [code] => 102 ) I need to generate an acces_token that lives forever and is able to

How to add Facebook App's accessToken to GraphRequest.newGraphPathRequest method? [duplicate]

耗尽温柔 提交于 2019-12-24 05:01:11
问题 This question already has answers here : Accessing Facebook Graph API without login (2 answers) Closed 2 years ago . I copied the code below from Facebook Graph Api console . However, Android Studio doesn't recognize accessToken . I have alread created a Facebook App and I got its acesstoken . But I don't know where to add it in the code. If I just copy and paste. It shows this error If I use AccessToken.getCurrentAccessToken() method, it will show this error: errorMessage: An access token is

Graph API manage_pages and publish_pages permissions disappearing from an access token's scope

China☆狼群 提交于 2019-12-23 22:23:40
问题 I am using the Graph API to automatically post to a Page. To get a Page Access Token, I have first logged in to my app using the Graph API Explorer's login with the permissions manage_pages , publish_pages and pages_show_list . I then used the access token tool to extend it, then used that to call me/accounts in the Explorer to obtain a Page Access token with no expiry time. When I first logged in to my app, it was in development mode. I looked at the access token in the Access Token Debugger

Cannot print the FBSDKAccessToken.currentAccessToken().tokenString in my iOS9 app

孤街醉人 提交于 2019-12-23 21:15:41
问题 I was creating an app in Swift for iOS 9 for learning purposes. I was trying to print the current access Token of Facebook at time when I log into Facebook through my app. When I click the fblogin button it opens Safari and shows me that I already have authorized my app but when I click okay it stuck on the Safari page and doesn't print the token as it should. And it says : fatal error: unexpectedly found nil while unwrapping an Optional value I am using XCode 7.3.1. I am adding the pic of

posting scores not working/ gives “Invalid OAuth access token signature.”

痴心易碎 提交于 2019-12-23 04:38:26
问题 whats wrong in this? FacebookDesktop.api("/me/scores",callBack,{access_token:appAccessToke,score:100}, "POST") app has the following permissions: publish_stream,publish_actions app is categorized as Games app is built using AIR app access token is obtained thisway: FacebookDesktop.api("/oauth/access_token", getAccessTokenHandler,{client_id:"xxxxxxx",client_secret:"yyyyyyyyyyyyyyyyy",grant_type:"client_credentials"}); 回答1: In your facebook app settings change authentication to web instead of

Facebook Graph API: getting an access token with an app ID and secret

偶尔善良 提交于 2019-12-22 09:53:26
问题 https://developers.facebook.com/docs/facebook-login/access-tokens/: Here is what I put in my browser: https://graph.facebook.com/?endpoint&key=value&access_token=[THE APP ID]|[THE APP SECRET] Here is the result.. an error message: (#803) Some of the aliases you requested do not exist: endpoint Help! 回答1: Goes to "https://developers.facebook.com/tools/explorer" Copy the code of "Access Token" I use "Access Token" as Token for Rfacebook Packages. and it works. Hope it can work on your side. 回答2

How to set the access token with the Javascript SDK?

∥☆過路亽.° 提交于 2019-12-22 04:41:17
问题 I am searching for something similar to what Facebook::setAccessToken($access_token) does in the PHP SDK ; that is, set the access token used for subsequent requests (having retrieved it by other means). In the Javascript one, I can only find the getter ( FB.getAccessToken ). I imagine this has been made on purpose to avoid using the access token client-side, but what are the risks if only the user related to the access token can see it ? I could embed it as a parameter for each query, but