I am trying to get the logged in user's pictures (Not profile pictures, but pictures from albums). So I figured I would use
[facebookInstance requestWithGraphPath:#"me/albums" andDelegate:self];
However the result object obtained is empty.
(gdb) po result
{
data = (
);
}
I also tried
[facebookInstance requestWithGraphPath:#"me/photos" andDelegate:self];
but I still got the same results. So I was wondering if there is something wrong I am doring with permissions? The permission I have right now is "read_stream". I hope this should be good enough, but I am not sure.
Apparently I did not read the documents correctly. I do require "user_photos" permission. Now it works!
Related
I'm trying to get post statistics on Facebook. I need to get the number of likes, dislikes, veiws and comment. I have already found the way to get post information: https://graph.facebook.com/v11.0/{page_name}?fields=name,posts&access_token=_____
But when I'm trying to get likes and comments, I get nothing: https://graph.facebook.com/v11.0/{page_name}?fields=name,posts{reactions,comments}&access_token=
You are likely not getting any specific reactions and comments, because you lack the right to access those. (They contain user data, and user data is only available if the individual user gave your app permission.)
If you only need the overall count, then ask for the summary:
?fields=name,posts{reactions.summary(1),comments.summary(1)}
Any one have any ideas on how to accomplish this?
I have tried
https://graph.facebook.com/search?q=%22%23apple%22
https://graph.facebook.com/search?q=%23apple
https://graph.facebook.com/search?q#apple
which does not work.
To be clear the results should only have posts that contain #apple not "apple".
Facebook says this is not supported at this time: https://developers.facebook.com/x/bugs/313941462054417/
if you're trying to get the #hashtags from Facebook, currently, there is no api for this. and even if there were- the posts are not intermediate, they are being cached. you won't see the most recent hashtag from a person who's not in your friendlist right away, this will take a long time to appear in the hashtag search
I've read too that it's not supported but,
trying the second line of jlarry
https://graph.facebook.com/search?q=%23apple
in Graph API Explorer, it works.
obviously the query is on the posts set as public.
so the query could be something like this
https://graph.facebook.com/search?q=%23joviberton&type=post
for further ops check https://developers.facebook.com/docs/graph-api/using-graph-api/
I came across to what I think is a weird behavior of the graph api..
From the facebook reference page https://developers.facebook.com/docs/reference/api/
, I tried the newsfeed method https://graph.facebook.com/me/home?access_token=...
and get the following json response:
{
"data": [
]
}
but than clicking on refresh button I get a feed:
and this is happening randomly at every refresh.. some of them with data in response some of them empty..
Looks like fb servers are out of sync.. and it depends which one you hit..
is this happened to someone else?
thanks.
I looked here: https://developers.facebook.com/live_status and it appears there is some issues but not anything related to what you're saying. I remember there was another question over the weekend from someone saying they were getting back different results from the same query, but I cannot remember what it is. #John, it sounds like the issue is reproducible, so you should file a bug report: https://developers.facebook.com/bugs
I'm building an app which allows users to post articles to their facebook wall. When an article is posted, I retrieve the post id and store that in the database along with the rest of the article details. Now I want to be able to show the comments made on that post when someone views the article in my site; I would also like to allow users to add comments to the post from my site.
I know that the user is always logged into Facebook when they are viewing the article, as the system checks for that earlier on.
I've been using the PHP SDK, and thought all I had to do was something like:
$post_comments = $facebook->api('/' . $post_id . '/comments');
However, when I do this, I get the following error:
Fatal error: Uncaught GraphMethodException: Unsupported get request. thrown in /APP_PATH/facebook/src/facebook.php on line 560
I really don't have much of a clue what I'm doing here, to be honest, as I'm very new to the Facebook Graph API, and I can't seem to find a lot of documentation on it.
Can anyone tell me what I should be doing here, or point me to some documentation I could read about it?
Thanks!
It should work.
Here is the code I am using which is working for me.
$comments = $facebook->api($postid . '/comments');
Make sure your postid is a valid one.
Alternatively, you can directly type that url in browser to get details like this
https://graph.facebook.com/<postedid>/comments
Please refer this link for further reference
http://developers.facebook.com/docs/reference/api/Comment/
I don't know what your PHP library is doing, but you can actually access comments by reading graph.facebook.com/<post_id>/comments. Indeed, try with this one from the doc.
Are your sure of your post id? Try to call the buggy function with 19292868552_118464504835613 as post id. It has to work.
I about to built a little online game in Action Script 3. At the moment everything is working pretty fine and there is just one thing left to do that makes me going crazy. After every Level of the Game the user should notified about his success and in case that the success was good enough, the user should be invited to a facebook group. At the Moment i have got an Facebook App, Authentification and Authorisation are working and what still is to manage is the invitation itself.
Does anybody know if there is a way to make this happen, and if so, how could it be done? Thanks a lot for a reply!
greetings!
So, after having a nice day of »facebook api investigation« i would sum up the things i found out:
I'm quite sure that there is no way to make an group invitation via the graph api. The best result i could reach was an Error that told me: »requires the manage_groups permission«.
Consequently I added this permission to the login method and »tada«: the app didn't work anymore, just told me that there is an error with the app and I should try later again.
The code for getting this great message looked like this:
FB.api( "//members","POST", { name : "user name" }, function( response ){
//the great error appears here in the response
} );
I also was looking for something in the facebook.connect api but could not find something related to the problem i tried to solve.
If there is anybody who knows something better to try, i would very interested.
Greeting Philipp
Looks like "manage_groups" is not available to the public, (yet?). I'm following this and this discussion about it, as "manage_groups" seems to be required to invite a user to a group, but is not listed in the Facebook reference of extended permissions.