I have a facebook page where i post photos, they appear on the timeline. I see button there, near 'like' and 'comment', 'share'. and i see count for how many times this item was shared. How can i get this count?
Things i tried:
img_id_on_facebook = '123'
fb = facebook.GraphAPI(token)
fb.request(path='/123/shares')
This gives:
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
Another try:
fb.request(path='/123/', args={'fields': 'shares'})
Gives same error.
Calling:
fb.request(path='/123/')
Has no key 'shares'.
I also tried the fql:
fb.fql('SELECT shares_count FROM link_stat WHERE url=https://facebook.com/123')
This gives:
GraphAPIError: Impersonated access tokens can only be used with the Graph API
I also tried:
fb.request(path='/[PAGE_ID]_[PHOTO ID]/')
This gives error: no such endpoint.
Anyone knows how can i get the number of shares for a photo? Is there a way at all?