facebook-access-token

How to get user access token?

时间秒杀一切 提交于 2019-12-17 22:24:36
问题 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

How should a Facebook user access token be consumed on the server-side?

独自空忆成欢 提交于 2019-12-17 21:26:07
问题 Preface I'm developing several web services and a handful of clients (web app, mobile, etc.) which will interface with said services over HTTP(s). My current work item is to design an authentication and authorization solution for the product. I have decided to leverage external identity providers, such as Facebook, Google, Microsoft, Twitter, and the like for authentication. I'm trying to solve the problem of, "when a request comes to my server, how do I know who the user is and how can I be

Need Help on OAuthException Code 2500

て烟熏妆下的殇ゞ 提交于 2019-12-17 18:43:21
问题 I am trying to develop an Facebook application (apps.facebook.com/some_app) using PHP where I need to present some information based on user's music interests. I found that its under "user_likes > games". My problems are as follows: To gain access, I have implemented the oauth dialog method as suggested in API in my index page. $auth_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page) ."&scope=user_likes"; After successful

FBSDKAccessToken currentAccessToken nil after quitting app

天涯浪子 提交于 2019-12-17 09:46:31
问题 I am developing an ios app using the Facebook SDK to login. I have set a LogInViewController as the initial View Controller in the Storyboard, from where the user logins using the FB account. I have another ViewController which is loaded correctly once the user logs in. In the AppDelegate file I am checking for currentAccessToken and if it is not nil, I am loading directly the second ViewController, because the user is already logged in. However, the currentAccessToken is always nil if I quit

Facebook page access token with “Reading Permission” only [duplicate]

痞子三分冷 提交于 2019-12-14 04:21:48
问题 This question already has an answer here : Get long term access token for Facebook page (1 answer) Closed 4 years ago . I want to show the one latest shared post of my Facebook page in a website (text description + date of posting). I'm using Javascript (client-side only, PHP is not allowed because the website is not hosted in an Apache server). For that I need an Access Token with Manage Pages permission (correct me if I'm wrong please). According to my researches, getting a token that doesn

How to get my own Facebook user access token indefinitely?

隐身守侯 提交于 2019-12-14 03:37:53
问题 I want to pull my most recent images from facebook's api for my personal website. I cannot seem to find a way to only authenticate my user without the login dialog. Does anyone know if this is possible? I can generate my user access token inside the graph API Explorer, but it expires in 1 hour. 回答1: How to get my own Facebook user access token indefinitely You cannot ! But you can extend this token that will be valid for 60 days - called the long-lived token . So, if a user visits your

Facebook PHP SDK Long-lived access token expires after refresh site

时光总嘲笑我的痴心妄想 提交于 2019-12-13 20:12:01
问题 I'm using Facebook SDK v5 for PHP and I'm trying to get long-lived USER access token. I'm getting it, makes long-lived once and save to my database, then I go to another page where I use it to get accesstoken to Facebook PAGE. To this point everything goes fine. Then I refresh my page, and User AccessToken has ["expiry at"] set to 1970-01-01. I have no idea what is happening, because I don't rewrite this access token in database. And the most wired thing is that, this token works with

Facebook: POST userid/apprequest throws an exception (Invitation is sent though)

南笙酒味 提交于 2019-12-13 17:57:18
问题 I am using trying to send app request to friends, My code always throws exception but I see that my friends get the App request. I am confused. Can someone let me know hot to handle the request dialog using rest-fb api? My Code String apprequestCall = "6111349/apprequests"; FacebookClient facebookClient = new DefaultFacebookClient(MY_ACCESS_TOKEN); try { String appRequest = facebookClient.publish(apprequestCall, String.class, Parameter.with("message", "Santhosh"), Parameter.with("data",

Facebook app access token posts are only visible to me and not my friends or followers?

微笑、不失礼 提交于 2019-12-13 05:39:09
问题 When I post to facebook using my App Access token, it is successfully posted and returns the post id. But I am the only person who can see the post on my wall, no body else can see the post. Please help me !? 回答1: In fact I just needed to go to Status & Review tab and allow make my app visible to general public. 来源: https://stackoverflow.com/questions/23088660/facebook-app-access-token-posts-are-only-visible-to-me-and-not-my-friends-or-fol

How to extend expiry of a long-live token in facebook graph api

烈酒焚心 提交于 2019-12-13 03:34:35
问题 I am having a issue here, I have a long-live access token, I dont want this token to expire after 60 days, I Understand that to extend the life time of a long-live token we need to fire a query below using shot-live token.. GET /oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token} But short lived token expires in hours .. So i cant use the same short-live token again to request for extending life span of long