Home Can I like pages through access token and python
Reply: 0

Can I like pages through access token and python

Adham Khaled
Adham Khaled Published in 2018-02-13 23:13:29Z

I tried to make a script that like pages through access token but it gave me that error below:

facebook.GraphAPIError: (#3) Publishing likes through the API is only available for page access tokens

and this is the script :

import facebook
token = input("type access token: ")
graph = facebook.GraphAPI(token)
pages = input("type pages you want to like by comma between each one: ")
for page in pages.split(','):
    page = graph.get_object(page)
    print("liked page: "+page['name'])

P.S I appreciate any help

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.2998 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO