S
S
Sergey Starozhuk2016-11-15 01:19:36
Facebook
Sergey Starozhuk, 2016-11-15 01:19:36

Displaying the number of Facebook likes and reposts?

When trying to display the number of likes and reposts from a Facebook group, an access error occurs.
Here is the request code:

https://graph.facebook.com/v2.8/?ids=GroupID_PostID&fields=reactions.type(LIKE).limit(0).summary(total_count).as(reactions_like),reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love)&access_token=AppID|AppSecret

In ids, we write the id of the group and through _ the id of the post. After we create the application and open access for everyone, then go to https://developers.facebook.com/tools/accesstoken/ and get the same AppID|AppSecret token.
Here we test the request:
https://developers.facebook.com/tools/explorer/?me...
But not everything is as good as it seems, the number of likes and reposts still cannot be pulled out. We get an error:
Invalid OAuth access token signature.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2016-11-15
@zoonman

Используйте токен пользователя, который является членом/администратором группы.
При авторизации пользователя добавьте user_managed_groups в scope.
https://developers.facebook.com/docs/graph-api/ref...
Для получения user_managed_groups не администраторам приложения потребуется ревью со стороны фейсбука.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question