For those who ask : Permissions The manage_pages permission has been deprecated and replaced with 4 new permissions: pages_manage_ads pages_manage_metadata pages_read_engagement pages_read_user_content
I tried to follow this, but ran into errors. When I just followed the tutorial, but also when cloning the complete code from github. Not sure if make any mistakes or there were changes after more than two years and the code itself needed some changes. Except from my personal token, ID and secret of course.
Thanks for creating this video! do i understand it correctly that this approach only works for accessing your own fb/ig accounts' data? i am trying to get all ig business accounts which have posted using a certain hashtag. but i don't have an app. i am confused what i need to do to get the access token.
hmm do you have the correct domain specified and spelled correctly "graph.facebook.com/v6.0/" That error sounds like the url to the enpoint is not configured correctly.
I don't think but I believe the long lived tokens will refresh their expire date when the user uses them. Only way they would expire is if the user does not use the token for 60 days.
I am totally confused about the Facebook and instagram thing. There is an endpoint to create an IG-APP long-lived-access-token as well... why not using it?
Heyy Great content! By the way I have an error for the long lived token saying that "Unsupported get request, Object with ID 'v6.0oauth' does not exist, cannot be loaded due to missing permissions. "
Thanks! That error is saying you are trying to pass an object ID of "v6.0auth" which is not an ID. Check and make sure your ids are in the correct spots and the request and endpoint string are defined correctly.
Not sure if you can help with this, but I can't seem to get the long lived token, requests gives a "Failed to establish a new connection: [Errno 11001] getaddrinfo failed" error. Any ideas? I think it may be due to forcing https?
I have not seen that "getaddrinfo failed" so I am not quite sure what the issue is. You can also use the Graph API explorer to make requests which makes testing the endpoints easier developers.facebook.com/tools/explorer/
Hey I had this issue as well. It is most likely that you spelled something wrong. In my case I typed "graph.facebook.com" instead of "graph.facebook.com/". The difference here was the "/". I found this error from "(host='graph.facebook.comv10.0', port=443)" and noticed that there was no slash in there. This was my issue, so you might have had an issue similar to mine.
Why use string yes/no parameter when you have a binary outcome that could easily take True/False? Wouldn't that be easier to read and therefore more "correct" per the Pythonic mantra?
congratulations, your content helped me a lot. How can I do to implement webhook in this code in python, would you have any documents or videos to help me? Thank you Fernandes Brazil
I do not think you can search for a users posts with a hashtag through the API. You could however grab and store all the users posts, then write a script that searches each post for a hashtag.
Yeah the API can be frustrating especially with no response. Maybe try the graph explorer tool at developer.facebook.com to get more insight into your token.
Thanks for the tutorial series justin , really helpfull!. I have trouble with the IG permissions when generating the access token, facebook denied and send me to an app review, so when I want to retrieve the data object in the response, it is empty. Has anyone here had a similar issue? I ve created a new facebook page (almost empty) to link my instagram, could this be the problem? Thank you!
When your app is in live mode, it needs to be reviewed and approved before you can start getting live data. This is probably why you are not getting anything in your response.
Also how can I get access toke without manually copying it from developers app..coz I will be giving my app to someone else to use it and they cannot do that... Please help..please
@@justinstolpe yes I saw that video. And in that u put a redirect url..I don't have redirect url nor webpage... I just want my python app to login into account get access token and do analysis on fetched data...so how can I do that?
@@parthpatankar8340 You need to present users with a facebook login dialog so they can authorize your app. This is the only way to get the access token.
For those who ask :
Permissions
The manage_pages permission has been deprecated and replaced with 4 new permissions:
pages_manage_ads
pages_manage_metadata
pages_read_engagement
pages_read_user_content
Thank you!
Great content. The APIs change a lot really quickly so this type of content is seriously helpful
Currently , there is no permission such as manage_pages in the API, we do have manage_pages_metadata, are both they same?
read the doc , they recently changed the publish_posts and and manage_pages to 6 new different permissions so you should add all those
Great straight-forward tutorial! Thank you. Wouldn't be able to accomplish it without this.
Thanks I appreciate it!
The content here is Amazing!
Suprised The Likes Are So Little
Thank you!
I tried to follow this, but ran into errors. When I just followed the tutorial, but also when cloning the complete code from github. Not sure if make any mistakes or there were changes after more than two years and the code itself needed some changes. Except from my personal token, ID and secret of course.
Great content. Thanks!
Thank you! This is super useful! Still work in 2024!
Thanks for creating this video! do i understand it correctly that this approach only works for accessing your own fb/ig accounts' data? i am trying to get all ig business accounts which have posted using a certain hashtag. but i don't have an app. i am confused what i need to do to get the access token.
Thanks! You can query for posts based on a hashtag. Check out my video on hashtags ruclips.net/video/TuQt5vW4uTw/видео.html
Keep getting this error: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'. Idk why
hmm do you have the correct domain specified and spelled correctly "graph.facebook.com/v6.0/" That error sounds like the url to the enpoint is not configured correctly.
video outdated -> 'message': 'Invalid OAuth access token - Cannot parse access token'
Very good content😊
Great job and thanks for sharing this knowledge.
Great video!
Greate video! Thnks for it!
Hey Justin, your video is the rescue! I was also wondering if we could use long lived token ( not yet expired ) to generate a new long lived token.
I don't think but I believe the long lived tokens will refresh their expire date when the user uses them. Only way they would expire is if the user does not use the token for 60 days.
I am totally confused about the Facebook and instagram thing. There is an endpoint to create an IG-APP long-lived-access-token as well... why not using it?
Yeah I could make a video for it
Excelent content. This help me a lot. Great content.
thak bro your genius
Heyy Great content! By the way I have an error for the long lived token saying that "Unsupported get request, Object with ID 'v6.0oauth' does not exist, cannot be loaded due to missing permissions. "
Thanks! That error is saying you are trying to pass an object ID of "v6.0auth" which is not an ID. Check and make sure your ids are in the correct spots and the request and endpoint string are defined correctly.
When I run the debug_access_token.py script, I get indentation errors in the w10 command prompt. Any ideas?
hmm not sure have not seen that error before
Hi Justin, Is this possible to use that token to do instagram scrapping?
You can use the access tokens to get data from endpoints as long as the users account is not a personal private account.
Awesome tutorial, thanks! If I add a Facebook Login on my app, will users(businesses or creators) be able to check their posts, media, etc... ?
As long as the account is connected to a page developers.facebook.com/docs/instagram-api/overview#pages
Not sure if you can help with this, but I can't seem to get the long lived token, requests gives a "Failed to establish a new connection: [Errno 11001] getaddrinfo failed" error. Any ideas? I think it may be due to forcing https?
I have not seen that "getaddrinfo failed" so I am not quite sure what the issue is. You can also use the Graph API explorer to make requests which makes testing the endpoints easier developers.facebook.com/tools/explorer/
Hey I had this issue as well. It is most likely that you spelled something wrong. In my case I typed "graph.facebook.com" instead of "graph.facebook.com/". The difference here was the "/". I found this error from "(host='graph.facebook.comv10.0', port=443)" and noticed that there was no slash in there. This was my issue, so you might have had an issue similar to mine.
Thanks for the instructions!
How can apply the Facebook Permissions for internal data analysis use?
You can use the facebook graph api explorer tool to generate tokens for use.
Why use string yes/no parameter when you have a binary outcome that could easily take True/False? Wouldn't that be easier to read and therefore more "correct" per the Pythonic mantra?
I probably had some reason at the time for doing so but don't recall, using true/false would be more correct
congratulations, your content helped me a lot.
How can I do to implement webhook in this code in python, would you have any documents or videos to help me?
Thank you Fernandes Brazil
Thanks, I do have one on webhook ruclips.net/video/82cpdEisqsA/видео.html you could get an overview and write it in python
Using these graph APIs can we get Instagram user-created posts within a particular hashtag?
I do not think you can search for a users posts with a hashtag through the API. You could however grab and store all the users posts, then write a script that searches each post for a hashtag.
/debug_token does not work. placed my access_token as input_token and access_token and I don't get a proper response. WHY? This API drives me nuts.
Yeah the API can be frustrating especially with no response. Maybe try the graph explorer tool at developer.facebook.com to get more insight into your token.
@@justinstolpe thank you. Yes, that is the way I will go.
Is there any way you could demo accessing another instagram user's data? What does that permission process look like?
It would be interesting to be able to have count of likes, count of comments, and the date for each post that a user (not you) made
Here is what the permission process would look like ruclips.net/video/RTwzPdMoTg0/видео.html
This is possible with the Insights endpoints. I will be making a video for getting Insights with the Instagram Graph API using python.
@@justinstolpe Okay awesome! Really appreciate these videos and all the time you put into them. So super helpful.
Thank you so much! I'm new to programming and this worked on my first try which is not what I'm used to
Glad it worked on the first try!
Please normalize your audio and thanks so much for the tutorial and code.
I don't have redirect url. What should I put?
You do not need it for this video
why are you still using python2?
It is just what got installed way back when I installed cygwin, I did not notice until you mentioned it, time for upgrade :D
Thanks for the tutorial series justin , really helpfull!. I have trouble with the IG permissions when generating the access token, facebook denied and send me to an app review, so when I want to retrieve the data object in the response, it is empty. Has anyone here had a similar issue? I ve created a new facebook page (almost empty) to link my instagram, could this be the problem? Thank you!
When your app is in live mode, it needs to be reviewed and approved before you can start getting live data. This is probably why you are not getting anything in your response.
i want to do the same for creator account
Thank you :D
Also how can I get access toke without manually copying it from developers app..coz I will be giving my app to someone else to use it and they cannot do that...
Please help..please
Without manual copying from the developers app you have to implement something like this ruclips.net/video/dEDKOcPuXlU/видео.html
@@justinstolpe yes I saw that video. And in that u put a redirect url..I don't have redirect url nor webpage...
I just want my python app to login into account get access token and do analysis on fetched data...so how can I do that?
@@justinstolpe also is there way to do this with python
??
@@parthpatankar8340 You need to present users with a facebook login dialog so they can authorize your app. This is the only way to get the access token.
Is this video at 1.25x? :'D