facebook-access-token

get a new short-lived user access_token

半城伤御伤魂 提交于 2019-12-13 01:04:57
问题 I need to renew a long-lived access token. I read Renew long lived access token server side topic and wrote a code as follows: <?php $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "https://www.facebook.com/dialog/oauth?" . "client_id=$app_id" . "&redirect_uri=$my_url" . "&scope=..." ; echo("<script> top.location.href='" . $dialog_url . "'</script>"); } else { $response = file_get_contents("https://graph.facebook.com/oauth/access_token?" . "client_id=$app_id" . "&redirect_uri=$my

How to handle Facebook Android SDK v4.1 Access Token between Activities

别说谁变了你拦得住时间么 提交于 2019-12-12 15:14:35
问题 When i go to another activity after successfully logged a user in i can't access to the Facebook Access token AccessToken.getCurrentAccessToken() I got this in the LogCat: {AccessToken token:ACCESS_TOKEN_REMOVED permissions:[]} 回答1: My solution if you are using the android login button is: To use a fragment and call it inside every activity, you can choose to display it or not depending on what the current activity will be doing, all the fragment's methods will work just fine. Here is some

Get Facebook Auth token from Azure Easy API

回眸只為那壹抹淺笑 提交于 2019-12-12 12:32:19
问题 Easy API are very poorly documented, I'm trying to get the Facebook Auth token from a user authenticated against it through Azure, I've created an API with the following GET: module.exports = { "get": function (req, res, next) { res.json(req.user.getIdentity("facebook")); } }; However azure responds with "cannot read property 'getIdentity' from undefined". If user is undefined in res, where can I get it from? 回答1: Easy APIs is documented in the Azure Mobile Apps Node.js SDK HOWTO and within

set user (access token) within FB.init

此生再无相见时 提交于 2019-12-12 09:38:30
问题 i want to publish story to user timeline even when they were not login with facebook. Actually I stored user access token in the database, if the user login in with email, i'll retrieve the access token for her. It works well in php (e.g get friends list after setAccessToken(token_from_database), but when i post the story, it always post to current fb login account's timeline. I think the problem is caused by fb.init: window.fbAsyncInit = function() { FB.init({ appId : 'XXX', // App ID status

How to get current access token in Facebook Android SDK V4?

偶尔善良 提交于 2019-12-12 08:53:51
问题 I want to check whether the user is logged in or not within the main FragmentActivity but although the user is logged in AccessToken.getCurrentAccessToken() returns null. What am I doing wrong in the code below ? public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = this; FacebookSdk.sdkInitialize(context); callbackManager = CallbackManager.Factory.create(); AccessToken accessToken = AccessToken.getCurrentAccessToken(); if (accessToken != null) { if (

Multiple Facebook accounts tied into one app

徘徊边缘 提交于 2019-12-12 05:26:26
问题 I'm trying to figure out to have multiple facebook accounts tied into my app. So that when different users login, they can access their individual facebook accounts. I would like to have my app have it's own login. After a user logs in they have the option to connect their facebook account. But because there are multiple users I need to figure out how to associate multiple facebook accounts. Here's what I got so far: Facebook Dialog Auth because SSO uses the Facebook App, thus only allowing

Where to request extended access token in Facebook App using PHP SDK

大憨熊 提交于 2019-12-12 04:34:06
问题 I need to get access to my user's information when they are offline and I understand that I need to use an extended access token which lasts 60 days. I have been looking at this SO post How to extend access token validity since offline_access deprecation and this says that I need to include the stated method in my base_facebook.php file and make a call to the method. However, looking through my code there is no explicit request or use of access tokens anywhere so I'm unsure how to request an

How do I obtain a Facebook access token for an app to post on a company wall?

感情迁移 提交于 2019-12-12 03:14:44
问题 So here is what I am trying to do. I have created my Facebook application and I have been able to use the Graph API explorer to specify the application in the top right. Some more detailed information, I am using C# to code in the functionality to our in-house app to get this to work. After that I go to the url section and type in the following address. https://graph.facebook.com/MyCompanyPage Then hit submit. It will navigate and display the information for that page below in the explorer.

Requesting long lived access_token on serverside flow

二次信任 提交于 2019-12-12 03:12:39
问题 I have a Java web app that posts items to our users facebook walls, when the user initially signs up we get a 60 day access_token which is persisted to our database, now that the offline_access is be removed I using our 'Login with facebook' button to update the tokens when the user logs into our website, this is all good as they will typically visit more than 60 days apart. I have implemented the above and it works well...but then I found that the access tokens that are being generated from

android error with facebook login on market

霸气de小男生 提交于 2019-12-12 00:24:37
问题 When i test this app on my device with eclipse is all ok;but when i publish this app on google play store the facebook login failed!! why? help me please!! it is a simply app ("coffee break" on market); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main ); elementoInserito=(EditText)findViewById(R.id.editTextElementoInserito); elementoEstratto=(TextView)findViewById(R.id.textViewElementoEstratto); inserisci=(Button