facebook-graph-api

Facebook Email field return null (even if the “email” permission is set and accepted) part 2

心不动则不痛 提交于 2020-01-14 07:49:09
问题 Here's a link to the topic which described my initial problem. In short: the problem is that in some cases facebook-graph-api doesn't return the email address of the user. Other stackoverflow mates suggested to use his Facebook email if he has a user name (i.e. userName@facebook.com) which I've done. But what to do if the facebook user doesn't have "username" there too. What would you recommend? To redirect him on the page asking his email address? 回答1: There are several reasons why Facebook

Pixel Activated Multiple Times for Facebook Pixel Tracking

纵然是瞬间 提交于 2020-01-14 07:41:06
问题 I am using some Javascript I got from Facebook to execute a "tracking" pixel. But when I use the "Facebook Pixel Helper" to see if things are working correctly, it indicates there is an error, and the pixel is being activated multiple times. It gives no instructions on how to resolve such an error, or even where to look. Are there changes I can make in this code from Facebook that would prevent this multiple firing? <script> (function() { var _fbq = window._fbq || (window._fbq = []); if (!

Suddenly, pages_messaging_subscriptions permission is required

℡╲_俬逩灬. 提交于 2020-01-14 07:38:09
问题 I have a simple message bot that was set up according to the Messenger Platform guide. It has been working fine for the last few months, with about half a dozen messages sent a day. I have not touched it at all, but suddenly, sending a message, ie calling https://graph.facebook.com/v2.6/me/messages?access_token=... , returns: {"message":"(#230) Requires pages_messaging_subscriptions permission to manage the object","type":"OAuthException","code":230,"fbtrace_id":"DVs...."} This was out of the

Facebook Graph API Read Followers Count

自作多情 提交于 2020-01-14 07:27:25
问题 Using the Facebook Graph API or some other means, is there a currently-available way to get a user's follower count? You'd think it would be a simple readable metric field at the user level, but after hours of searching, I cannot find such a field. I know Facebook considers the concept of followers to be valid, because they have a working "edge" for it with their web interface, https://www.facebook.com/user_name/followers as well as listing the account on the user's main page (see image

Error to get the access token in facebook using php sdk

最后都变了- 提交于 2020-01-14 07:25:07
问题 The code that I'm using : $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', 'default_graph_version' => 'v2.6', ]); $helper = $fb->getCanvasHelper(); try { $accessToken = $helper->getAccessToken(); } catch(Facebook\Exceptions\FacebookResponseException $e) { // When Graph returns an error echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { // When validation fails or other local issues echo

FB Messenger Bot: Webhook updates not being delivered

不想你离开。 提交于 2020-01-14 06:47:09
问题 i am working with Facebook Checkbox Plugin everything is working fine except facebook is not sending request to my webhook url when Confirming Opt-in. in facebook docs it is mentioned that After the opt-in event, we will post a webhook event to your server if the checkbox state was checked. This callback has the same format as the opt-in callback, but instead of a sender field, it has an optin object with a user_ref field. But it is not sending any data. here is my webhook code if (!empty($

FB Messenger Bot: Webhook updates not being delivered

会有一股神秘感。 提交于 2020-01-14 06:47:08
问题 i am working with Facebook Checkbox Plugin everything is working fine except facebook is not sending request to my webhook url when Confirming Opt-in. in facebook docs it is mentioned that After the opt-in event, we will post a webhook event to your server if the checkbox state was checked. This callback has the same format as the opt-in callback, but instead of a sender field, it has an optin object with a user_ref field. But it is not sending any data. here is my webhook code if (!empty($

Facebook PHP SDK4 - FQL Request

a 夏天 提交于 2020-01-14 06:10:15
问题 somehow my FQL request won't work in PHP. In the Graph API Exporer the Query works fine. This is my main code: $params = array( 'method' => 'fql.query', 'query' => "SELECT friend_count FROM user WHERE uid = me()", ); // graph api request for user data $request = new FacebookRequest( $session, 'GET', '/me', $params ); $response = $request->execute(); // get response $graphObject = $response->getGraphObject()->asArray(); // print profile data echo '<pre>' . print_r( $graphObject, 1 ) . '</pre>'

How to edit an existing event using the Facebook Graph API

≡放荡痞女 提交于 2020-01-14 06:09:24
问题 I've done extensive research on this, and am baffled. Similar questions on stackoverflow have been answered with, in in short: RTFM. Well, I've done that, and more, and I still can't find how to do this. On the main FB Graph API page, documentation is given for authenticating, reading, publishing (creating), deleting Graph objects, but I don't see modifying anywhere. The FB Graph API > User page gives description only of how to create and delete an event on behalf of an authenticated user. I

How to Convert Char set in android?

♀尐吖头ヾ 提交于 2020-01-14 06:02:05
问题 When using Facebook api I get these characters as a json response. I think these are Unicode characters. How can I convert them into normal characters ? \u0dbb\u0d82\u0daf\u0dd2\u0d9a \u0da2\u0dba\u0d9a\u0dd9\u0dcf\u0da9\u0dd2 Thanks in advance ! 回答1: Use Html.fromHtml("\u0dbb\u0d82\u0daf\u0dd2\u0d9a \u0da2\u0dba\u0d9a\u0dd9\u0dcf\u0da9\u0dd2").toString(); 来源: https://stackoverflow.com/questions/8518019/how-to-convert-char-set-in-android