Trying to do a search through the Facebook API using the search of graph. I know that when logged into my personal email, I can search people via email address rather than their name.
http:///www.graph.facebook.com/search?type=user&q=myemail#email.com
Returns this:
{
"error": {
"message": "(#200) Must have a valid access_token to access this endpoint",
"type": "OAuthException",
"code": 200
}
}
Although I am using the API explorer which should work.
Any ideas? Is this not available anymore? I found other posts that had it working like this one
Is there a way to do this via FQL?
Facebook API does not allow search user by email.
Related
I am using facebook's graph api. The access token I am using is the User's access token, (my personal access token). I am invited to these events personally. These events are public.
When I type /{eventid}/?fields=owner, I get
{
"error": {
"message": "(#200) Permissions error",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "DcJaHySwF7S"
}
}
When I do /{eventid}/?fields=cover or most other fields it works just fine.
I am using the online graph tool v3.3 and tried it on v3.2 as well.
I have also tried this on curl on my personal terminal.
Below is the oath permissions I have set using the Graph API explorer.
Permission's Image
Since you cannot even get the list of Page Events right now (even if you own the Page), I assume it´s not possible: https://developers.facebook.com/docs/graph-api/reference/page/events/
This is a restricted edge. You cannot request access at this time.
I wonder if it's possible to obtain user's birthday via Facebook Graph API 2.8. I am using Graph API Explorer and it requests me to put {user-id}. Can I retrieve the birthday information only knowing the user's name and surname? How should I specify the query? For example, GET/v2.8/"NameSurname"
All my attepts to write a request are finishing with this error:
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: \"NameSurname\"",
"type": "OAuthException",
"code": 803,
"fbtrace_id": "FRE/aemzTRL"
}
}
UPDATE:
I was able to only retrieve the data for myself using something like me?fields=name,email,gender. But is it possible to get the same data for another person knowing his/her name and surname?
You can only get data of users who authorized your App, by using their Access Token with /me?fields=name,email,gender,birthday
You need to authorize them with the email and user_birthday permissions, btw.
I am developing an android app. I was using a HttpURLConnection to get profile pictures of facebook users. The URL looks like this:
http://graph.facebook.com/?ids=username1,username2,username3&fields=picture&type=square
But now, since v2.2 doesn't let me to get profile pictures of users who are not using my facebook app, it throws an error:
{ "error": {
"message": "(#803) Cannot query users by their username (username1)",
"type": "OAuthException",
"code": 803 } }
I am not interested in using "Facebook SDK for Android". Let's say I use a pop-up webview to authorize my facebook app. What url would let me do the same thing? Is there a simple solution like this:
graph.facebook.com/?app=APP-ID&ids=username1,username2&fields=picture
Since v2.0 of the API, you are not supposed to use usernames at all - and that´s why you can´t query users by their username anymore. The only way to get access to data of a user is by authorizing that user and using the /me endpoint.
Main rule: Forget about users who did not authorize your App, you are not supposed to get any data of those for privacy reason.
I have a comment interface that needs to show peoples Facebook profile pics and names. When I try to get the info using /me in the graph API it works. But if I use someone else's userID I get an error:
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "EY/oRYYby2u"
It works if I am friends with the other person, so is not being friends why this doesn't work? They have both authorized the app. Do I need to server side store everyone's access tokens and use the corresponding token to access the data I need?
If you have the app token you can get name of each user connected to app.
https://graph.facebook.com/userID?access_token=App_token
I have an app with advanced permission for fanpages.
I was wondering, is there any way possible to add an admin to a fanpage through any API?
It's not possible with regular apps, the app must be whitelisted.
{
"error":
{
"message": "(#100) App must be on whitelist",
"type": "OAuthException",
"code": 100
}
}
Graph api for page
only gives the documentation about fetching admins but there's nothing about adding new admins.
But this should work (though, it gives me "app should be on whitelist" error)
POST admin_id field with valid facebook id to
https://graph.facebook.com/<page_id>/admins,
with a valid page access token (not user access_token)