문제

I want to store all details about particular post which includes likes, comments and shares. I am able the fetch likes and comments with following syntax:

graph.get_object('/'+post_id+'/likes?limit=10000&format=json')
graph.get_object('/'+post_id+'/comments?limit=10000&format=json')

In similar fashion i tried to fetch share details of that particular post

graph.get_object('/'+post_id+'/share?limit=10000&format=json')

but it returns empty array. But when fire this query:

graph.get_object('/'+post_id)

its returns lots of data and also says that "shares"=>{"count"=>26}

So that particular post has shares but i am not able to fetch share.

도움이 되었습니까?

해결책 2

Yes i figured out

graph.get_object('/'+post_id+'/sharedposts?limit=10000&format=json')

다른 팁

Looking at facebook's documentation I'm not sure you can get anymore than the count.

In case someone else finds this like I did - please note that you will need the "read_stream" permission on the Facebook app in order to make this work.

https://developers.facebook.com/docs/graph-api/reference/v2.2/object/sharedposts

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top