I want to get the emails of my friends using FQL, so I pass the permission "proxied_email" to Facebook SDK. It shows error on FB dialog:
"Invalid parameter. Error message: Unsupported scrop: "proxied_email".
I think this is a bug
Apparently this link says that I need the permission "proxied_email"
Is it a bug???
By the way, I can't get the email, it always returns null. How to do it?
proxied_email is not a permission, but a field in the User FQL table. This is why you get an error.
You must ask for the email permission to get the email.
Here is how to get the email:
SELECT email FROM user WHERE uid=USER_ID
Related
We have issues with our web app and Facebook.
I'm doing the Login with scope email
FB.login(function(response) {
// my code
}, {scope: 'email', auth_type: 'rerequest', return_scopes: true});
I got the popup asking permission for the email, and other fields
I accept it, but then after getting the access_token, I call
https://graph.facebook.com/v15.0/me?fields=id,first_name,last_name,name,email,picture.type(large)&access_token={MY_TOKEN}
The email field is not in the response
What I don't understand is that user is a test user created on Facebook app page. One in Two users I create have this issue. For some other users, I have the email with the same exact procedure
Do you know what could happen?
We are experiencing the same issue.
WizKid is right. Try using https://developers.facebook.com/tools/explorer/ and you'll see that when you get no email, this tool shows "The email field was not returned. This may be because the email was missing, invalid or hasn't been confirmed." message.
We had built widgets for Facebook in Salesforce (Force.Com) Enterprise Version Environment using their API which has stopped working from some time.
We are getting error of "Unknown field:Username" when we are using username in the endpoint url on the profile search. Although, we know that username is no longer available in the endpoint URL from V2.0. So , anyone kindly suggest any other way to make profile search possible(on username) without using username in the endpoint URL.
Error : (#100) Unknown fields: username
Simply put:
To search for a username is no longer possible. You can try
/search?q=mark%20zuckerberg&type=user
to search for a user by his real name.
I want to retrieve the current user's notifications from the past 8 hours. I'm using the Graph API Explorer on FQL mode before I put this into my app. On permissions, I have user_about_me and manage_notifications. The request i'm searching for is this:
SELECT notification_id FROM notification WHERE recipient_id={0}
But it returns:
{
"error": "Request failed"
}
What am I doing wrong?
The error Request failed
generally occurs when the your request in not correct.
If you read the documentation properly, this API is used to fetch -
The current user's notifications
So, only valid recipient_id could be the current user's id or me(); not his friends or any other user.
If you have tried the current user's id to the recipient_id, that means the id you've provided with {0} is not correct (some syntactical error).
So, instead you could simply write recipient_id = me()
When I access the list of my friends using the URL https://graph.facebook.com/me/friends?access_token=... I can see the list of my friends. I can do this programmatically as well.
Now, when I take the ID of any of my friends and replace it with "me" in the above URL, and paste the URL in the browser, I can see my friend's friends. I am unable to do this programmatically because it is giving me an HTTP 400 ERROR.
Does anyone know why this is possible by pasting the URL and not programmatically?
You can not get the "friends of friends" using the facebook api.
For example, try the simple /me/friends with the Graph API Explorer, it should work fine.
Then, take one of the ids there and try the same with FRIEND_ID/friends and you should get this:
{
"error": {
"message": "(#604) Can't lookup all friends of FRIEN_ID. Can only lookup for the logged in user or the logged in user's friends that are users of your app.",
"type": "OAuthException",
"code": 604
}
}
The error itself is very straight forward and explains exactly what the problem is.
As for why that translates into a 400 error code for you is unclear.
Edit
You can't see the "friends of friends" in the browser as well, the reason that it works for you (probably) is that the user(s) you check the friends for (USER_ID/friends) installed the app that the access token belongs to, from the way you got to that url I assume that the app is the "Test_console".
How to check? Copy the access token from the url (USER_ID/friends?access_token=xxxxx), go to the Facebook Debugger and paste the token in the text field and click "Debug", it will show you info regarding the application.
The user you checked it for probably has that app "installed", if you check it for other users you will get that error when you get to a user who does not have that app "installed".
I hope this clarifies it for you.
I got friends of friends(limited) who are using application. I had same problem. Though it is very late for answering question, it will help somebody. That's why answering this question.
We can get friends of friends those are app users.
$fb_id= user id whose friends of friends required.
Try this fql query.
$query="SELECT uid, name, work_history FROM user WHERE uid IN (SELECT
uid2 FROM friend WHERE uid1 IN (SELECT uid FROM user WHERE uid IN
(SELECT uid2 FROM friend WHERE uid1 = $fb_id ) and is_app_user=1) )";
It needs following requirements:
Your friend needs to be using application.
Permission from application read_stream, publish_stream, publish_checkins.
I'm trying to post a reply to an inbox message by sending a POST request to /message_id/comments. Is this the correct way to send a reply to an inbox message ?
I'm getting the following error:
"error": {
"type": "OAuthException",
"message": "(#3) App must be on whitelist"
}
The token has every possible permission.
Do I have to ask that my app is added on a whitelist ? how to do so ?
I'm doing this in javascript+jQuery:
var params = {
access_token: token
, method: 'post'
, message: 'hi'
};
$.getJSON('https://graph.facebook.com/$message_id/comments?callback=?', params, function(json) {
});
Facebook apps by default aren't allowed to send messages on behalf of users. There is no permission you are missing. This is an extra level to prevent spam (beyond prompting the user who). You will have to contact Facebook to get your application whitelisted. I would try their developer group.
opened a support ticket right here:
http://developers.facebook.com/bugs/183144141763793?browse=search_4e8b140cbf26e6040457329
Tried all I can think of and googled for, still getting this issue
Like others have pointed out, there isn't a way to do this programmatically unless you are on Facebook's whitelist. However, I did find a way around this for my app. What I do is use Oauth to display messages from a user's FB inbox like normal. When the user clicks 'Reply' on a message, I just send them to the reply page on Facebook Mobile, like this:
$('.reply').click(function() {
var popup_window = window.open('http://touch.facebook.com/messages/compose?ids='+message_id, '_blank');
popup_window.focus();
});
Where message id is the Facebook id for the message they are replying to. In my case, I use PHP to echo the message id into a javascript variable or data-attribute when the page loads. Since the Facebook mobile page opens in a new tab, they don't even really leave my app. Since Facebook mobile has a very streamlined interface it isn't too distracting. It's not perfect, but it works and it's easier than trying to get whitelisted.