facebook-access-token

How to get user profile info using access token in php-sdk

喜欢而已 提交于 2019-12-03 04:06:13
I want to get user profile using access token that i have already generated , and if the access token is invalid it shoud display error. anyone can help to do this ? i want php code to handle this. i am waiting.... Since you already have the access token , the simplest and clean way would be- $user_details = "https://graph.facebook.com/me?access_token=" .$access_token; $response = file_get_contents($user_details); $response = json_decode($response); print_r($response); First check if the user is logged in $facebook = new Facebook(array( 'appId' => 'AppIDHere', 'secret' => 'AppSecretHere', ));

Sensible solutions to the removal of the offline_access permission

纵然是瞬间 提交于 2019-12-03 03:31:27
Am coming back to building a FB app after some time away from the FB Platform and I see that the old offline_access permission has been removed and replaced with long(ish)-expiry tokens[1]. So, it now seems like any external app that needs to push data to Facebook based on, say, a schedule or some activity in the external app will need to cope with that long-access token having expired. This is made more frustrating because now a user logging out of FB will also kill any long-expiry token[2], whereas before, offline_access lived on even when the user was logged out. I'm still in the pondering

Get wall feed from a public Facebook page using Graph API - is it really this complex?

佐手、 提交于 2019-12-02 23:24:28
I have started off by reading Displaying Facebook posts to non-Facebook users which is of some use but I cannot believe it is this difficult to get a public feed from Facebook. The page I want a feed from is public, you do not need to be logged into get to it. Am I right in presuming that I need an access_token to get to this information, attempting to access the URL without results in an OAuth error. So the flow should be like this (massively, overly complex): Authenticate using a user (what if the user isn't on Facebook?) Some complex OAuth nonsense - just to read the feed, I do not even

How to handle Facebook's deprecation of offline_access when you use token both in both iOS app and a server

我只是一个虾纸丫 提交于 2019-12-02 19:36:14
Facebook's deprecation of the offline_access permission is coming May 2012 and the documentation isn't giving us enough information on how to handle it. We have an iOS app and corresponding service that powers it and integrates with Facebook in a deep way to leverage a user's friend list within out app (so if your FB friends are also using the app you can more easily connect). This is like how all social apps seem to work, so nothing special here. Client Our app uses Facebook iOS SDK to allow user to login, which we currently ask for offline_access . The token is persisted in our iOS app, but

Facebook android sdk's 'AccessToken.getCurrentAccessToken.getUserId()' method is returning different id from the id retrieved using findmyfbid.com

▼魔方 西西 提交于 2019-12-02 16:24:46
问题 I'm trying to get user's id like this: AccessToken.getCurrentAccessToken.getUserId() and it is returning an id like this: 1493******22153 but when I'm retrieving the id for same user using findmyfbid.com, I'm getting an id like this: 1000******00783 Though both ids when used like this https://facebook.com/id is opening the same profile successfully in browsers. Why is this happening and what is the difference between these 2 ids? 来源: https://stackoverflow.com/questions/46751331/facebook

Facebook Access Token [Javascript SDK]

青春壹個敷衍的年華 提交于 2019-12-02 12:07:21
I am writing Facebook login for my site.I am using Javascript Sdk,but I don't understand one thing. function fbLogin() { FB.login(function(response) { if (response.authResponse) { var token=response.authResponse.accessToken; FB.api('/me', function(response) { $.get('main/check_facebook_status/'+token,function(data) { if (data == "true") { $('#r_name').val(response.name); $('#r_username').val(response.username); $('#r_email').val(response.email); $('#fbid').val(response.id); $('#fbtoken').val(token); } }) }); } else { console.log('User cancelled login or did not fully authorize.'); } }, {scope:

Facebook android sdk's 'AccessToken.getCurrentAccessToken.getUserId()' method is returning different id from the id retrieved using findmyfbid.com

孤街浪徒 提交于 2019-12-02 10:57:10
I'm trying to get user's id like this: AccessToken.getCurrentAccessToken.getUserId() and it is returning an id like this: 1493******22153 but when I'm retrieving the id for same user using findmyfbid.com , I'm getting an id like this: 1000******00783 Though both ids when used like this https://facebook.com/id is opening the same profile successfully in browsers. Why is this happening and what is the difference between these 2 ids? 来源: https://stackoverflow.com/questions/46751331/facebook-android-sdks-accesstoken-getcurrentaccesstoken-getuserid-method-is

Vulnerability with Facebook token hijacking

吃可爱长大的小学妹 提交于 2019-12-01 18:19:41
According to Facebook manual for developers ( https://developers.facebook.com/docs/facebook-login/security ) you don't have to use access_token from some sort of Facebook SDK clients without ensuring that it was generated specifically for your Facebook application. I'm wondering what kind of vulnerabilities has place here. Why I should care about which app received token if I can use it to make API calls and get user data through it? Token Hijacking To understand how this happens, imagine a native iOS app that wants to make API calls, but instead of doing it directly, communicates with a

OAuthException : An active access token must be used to query information about the current user

百般思念 提交于 2019-12-01 17:50:02
I'm trying to run the sample code for Facebook connect that I downloaded from http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/ I get this error message : [error] => Array ( [message] => An active access token must be used to query information about the current user. [type] => OAuthException [code] => 2500 ) You can try on my website : http://facebook.oliverjordan.net/thinkdiff Here is the fbmain.php code : <?php //facebook application $fbconfig['appid' ] = "463007877113xxx"; $fbconfig['secret'] = "-sensor-"; $fbconfig['baseurl'] = "http://facebook

Vulnerability with Facebook token hijacking

感情迁移 提交于 2019-12-01 17:31:20
问题 According to Facebook manual for developers (https://developers.facebook.com/docs/facebook-login/security) you don't have to use access_token from some sort of Facebook SDK clients without ensuring that it was generated specifically for your Facebook application. I'm wondering what kind of vulnerabilities has place here. Why I should care about which app received token if I can use it to make API calls and get user data through it? Token Hijacking To understand how this happens, imagine a