If I have X-FB-Debug id, can Facebook help me? - facebook

I am having an ongoing issue with Facebook not liking the response it gets back from my server. I would assume that somewhere Facebook has logs that might provide clues as to what the issue is with the response. Does Facebook have a way, other than the Bug Reporting mechanism, to request errors from their server logs matching my X-FB-Debug Id or AppId?
Possible? Probable? Likely?
Surely someone must know what this X-FB-Debug number is for, but I'm not finding references to this.

Related

Facebook Graph API /debug_token empty response

I am using Facebook's PHP SDK (because it still works, even though it's deprecated, and there's no proper PHP alternative in place), and I've somewhat recently received messages from Facebook about my login app being deactivated because it "has too many errors". I decided to debug it and find out what seemed to be the problem, and it turned out that at the /debug_token step it receives an empty response from Facebook, which is, of course, invalid.
According to https://developers.facebook.com/docs/graph-api/reference/v15.0/debug_token,
this API endpoint should return information about an access token that I received from /oauth/access_token. I tried requesting for this debug information in Facebook's own Graph API Explorer, but the response I got was {"data":[]}. There were various errors if I provided the wrong data, so I would assume if the access token was wrong, I would have also received an error, but nope.
Commenting out the bit of code that does the access token debugging/validation fixes the whole thing, but that hardly seems like the right fix, although it counts for the end users.
The PHP SDK github repo is archived, I can't ask questions here, so I have no other choice but to ask here - 1) does anyone know if the debug_token step is required, and if yes, then 2) for what reasons, and 3) what could possibly be the problem here? At the moment it absolutely seems that the fault is at Facebook's end, I went through all the server requests and all of them work except this one.
I got the same issue about empty array from /debug_token endpoint. After investigations, it seems to be only on development applications. With live applications, /debug_token returns data ... Another weird behaviour from Facebook Graph API 🤷🏻‍♂️

Query friends list of facebook user using the service

From my understanding Facebook has made changes to their API such that third-party services can no longer have access to the friend list (at least names) of someone using your app (while being logged in facebook, of course).
Does anyone know if I maybe just missed one API endpoint, and it is still somehow possible? I just know that the original one is deprecated/has been removed. Thank you.
(Wasn't sure where to ask this, so I turned to stackoverflow. I know it's not the best use of the site, I apologize for that.)
No, you did not miss anything, accessing the friend list is no longer possible. You can only get data of users who authorized your App too, every other user is not available at all - for privacy reasons.

Facebook messenger API sender name not available

I have a bot using the Facebook Messenger API/webhook.
When Facebook sends a message the sender only has the id set, not the name.
So I try to get the name using the graph API using,
https://graph.facebook.com/v2.6/<sender-id>?fields=first_name,last_name&access_token=<page-token>
The sender id it gives you does not seem to be the real id, so using your app token does not work, but using the page token does not seem to work all the time either.
From my logs I see it work some time, and not others.
I get the error,
(#100) No matching user found
My only guess is that if it is an older conversation, the id it gives you have expired somewhere, so you cannot get the name?
Anyone else have this issue, or find a work around?
Okay, figured it out, and is user error.
The issue was I had another app linked to the page when testing it, and I have no removed the webhook. So the webhook was called twice and one of them had a bad token for some reason of other.
Anyway remove the webhook from the other app fixed the issue.

How can I post on a user's wall on my behalf?

Let's say I am user A and there is a user B. Is there some way to use the Facebook API or anything else and post on wall of user B using programming in such a way that the post appears to be by me?
I can get any permission I want because we are close friends. I would just like to post some jokes on the user's wall automatically at regular intervals. I have gone over a few questions asked related to this topic and they suggest that it is not possible by any means. However, they are all very old and I would like to know if there have been some new developments in the API or are there any other techniques that I can use?
I have successfully posted status updates on my page using PHP but the process seems to be a bit different for posting on a user's wall. There are a lot of question like, who do I need to get permissions from? Could anyone point me in the right direction by providing link to some tutorial or the part of documentation that I need to read to get started?
You can´t post to the wall of a friend. You can only post to your own wall with the API (with the publish_actions permission and the /me/feed endpoint). This will most likely never change, as it would be considered spam in most cases.
I would just like to post some jokes on the user's wall automatically at regular intervals.
...and that would not only be spam by definition, but also not allowed even if it would be possible. Autoposting is never allowed, and the message always must be 100% user generated.

Retrieving friend's likes from the Facebook Graph API

Howdy- I have been tooling around with the Facebook Graph API and successfully retrieved back a list of my likes, and a list of my friends (once I authenticated using OAuth). But what I really want to achieve is pulling back my friend's likes. When I try and do that, obviously using the same URL that I use to pull back my own likes but subbing the friend's user id for "me", I don't get anything back, unless they have installed the app as well. Then I get them no problem. To be clear, I can only see the likes of friends who have installed my application. So clearly I am running into a security/rights issue of some sort.
I could see where this would be the case; you simply aren't allowed to see your friend's likes unless they have installed the same app. Fair enough, but then how is blekko.com doing it? I even tried using FQL without much luck. I suspect I am missing something totally obvious. Anyone had any luck with this? Maybe with the Javascript API or one of the other access methods? Thanks in advance for any guidance.
Your application needs the permission "friends_likes".
Check http://developers.facebook.com/docs/authentication/permissions for more info on the different permissions.
This SO answer might help if you're having trouble with the authentication / permission request process.