Is there a way to get the ID of a message thread in Facebook? [closed] - facebook

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
If I have the URL of a facebook thread from a user's messages, is there a way to get the id of that thread? I get how to construct a url given an id, but not the other way around.
The URL can have two formats:
https://www.facebook.com/messages/123456789
or
https://www.facebook.com/messages/<username>
I need to be able to handle both cases.
Thanks.

SELECT thread_fbid
FROM unified_thread
WHERE single_recipient = <USER ID>
Doc: https://developers.facebook.com/docs/reference/fql/unified_thread
This gives exactly what you want. The problem is:
(#298) You must be a developer of the application
Please read unified_thread still not open for public?
So, one actual workaround would be to loop on all the threads from graph.facebook.com/me/inbox?fields=to as long as you didn't find one which:
has only 2 participants (because some threads are group conversations and you don't want them),
and contains the participant who is the person represented by a user ID/username.
This has to be done manually, using your favorite language.

Related

How format this REST URL [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I have a model Locker. These lockers can get time-limeted codes to open them. If I put a button on my page I want to call a URL to SMS or email such a code to someone selected in a popupmenu. I need to send both the ID of the locker (eg "123") and the ID of the person (eg "456)
The best I came up with is:
www.myapp.com/locker/123/person/456/sms
www.myapp.com/locker/123/person/456/email
Is this good REST practice or am I seeing things wrong and are there better ways
Let me answer this question for 'email'. My answer for 'sms' would be similar.
In REST API design, you always have to answer the question "which resource am I creating, getting, updating or deleting"? In this particular case, I see two options:
You create an Email resource. In my perception, the Email is not part of a locker, nor part of a person, rather it is part of a person's inbox, like this:
POST www.myapp.com/inboxes/456
The locker ID 123 would be included in the message body (payload) or in the query string (?locker=123).
If you're not really creating or updating a resource, but instead you are executing a task not affecting any resource, the REST API style is in fact not appropriate. To admit this fact and show the non-REST nature of the call, you could have a URI like this:
POST www.myapp.com/code-mailer?locker=123&person=456

Can I get the number of likes from a facebook page without being the admin? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
My question is that. I'm trying to get the likes of a facebook page with facebook apigraph explorer but I can't get the count. I have look for other answers but they don't work to me so I'm thinking that it is because I'm not administrator, could be ?
I think that it is a simple thing so it have to be possible, as I can see the likes of a page entering in it on facebook.
I know that with /namepage/likes I can get all the likes but I need the count of all of them. For example:
humorcabron/likes?fields=likes.limit(1).summary(true)
but I don't get the count of all of them.
Plese could you tell me How can i get the number of likes and what I'm getting?
Solved the previous versions of the api (before 2.5) works like I said at first
humorcabron?fields=likes.summary(true). At newer versions what I was looking for is humorcabron?fields=fan_count

Get FB likes, shares and comments for a URL using PHP - with no limit [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How can I simple get count of likes, shares and comments from a URL using PHP?
The method using FQL or graph.facebook.com didnt work anymore.
I need also about 1000 requests per day, I need solution with request limit more then 1000.
I think that FQL became deceprated by the beginning of August. I've solved this problem using graph API and stating the fields argument
fields=likes.limit(0).summary(true),comments.limit(0).summary(true)
the fields likes and comments would give you a list of people who liked or commented on it, the .limit(0) means that you don't need any exact names mentioned and .summary(true) gives you more detailed info on it - the number of likes/comments.
I hope this explanation helps, you can find more info here https://developers.facebook.com/tools/explorer

Getting the locations of facebook likes [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am curious; is it at all possible to somehow get data about the locations of likers (those who have a public location anyway) on facebook pages?
I'm merely curious for statistical reasons whether A or B is more popular in country Z, etc....
I assume its not possible without a bit of coding but any points as to what would be the way to look into creating something to trawl a likes list?
There's the page_fans_country metric of the Page's insights edge, e.g.
/cocacola/insights/page_fans_country?period=lifetime
to get the lifetime likes by country for the CocaCola page. You can use this with an App Access Token like this:
GET https://graph.facebook.com/cocacola/insights/page_fans_country?period=lifetime&access_token={app_access_token}
where {app_access_token} is the App Access Token you want to use.
See
https://developers.facebook.com/docs/graph-api/reference/v2.4/insights#reading

facebook real time subscriptions api [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How do you subscribe to the real time API to user photos changes in order to get the likes and comments of user uploaded photos when they are liked and commented? Are there any necessary app settings or specific graph api calls that need to be made?
Regards
Have a look at the docs at
https://developers.facebook.com/docs/graph-api/real-time-updates/v2.4
Keep in mind that you can only receive user updates if the user has given your application the appropriate permissions.