Instagram ads engagement is only for business api? - facebook

I am doing a project for my company and I am stuck. I have to make this cost-effective.
In this link there are some methods to get comments and do comment but it gives me error: "(#10) Application does not have permission for this action" and when I try to query them with standard API it says that media_id is not valid(I got the media id with oembed code btw I am not putting there effective story id).
My question is:
Do I have any solution for getting and doing comments to ads other than switching to Business API? If I don't how should I progress with this? Should I just send my app to review with instagram_manage_comments?
Thanks

Ad comments are on Ad media - and Instagram ads are only created via facebook ad account.
You have to use facebook ad graph API. You can check detail info at this answer: Instagram dark posts, using api to read info and do operations
The link you gave in the question is correct starting point to fetch ad media and comments. However you don't need Instagram accounts to be converted to "business account" to be linked with FB page(more context for that here). But you do need to connect with FB ad account for ads media.

Related

Post a picture on Instagram using Graph API e.g. with python

For me, it seems that the API to interact with Instagram has changed completely in comparison to a year ago (probably due to the integration in facebook/meta). Basically, all approaches to access the Instagram API which I found on stackoverflow or github are not working anymore (e.g. instapy_cli).
I would like to create a Python3 script which uploads a picture to my Instagram CREATOR account. What I have:
Created a Facebook/Meta developer app under https://developers.facebook.com/apps
I can see a User Token and an App Token under https://developers.facebook.com/tools/accesstoken
If I use the Meta Graph API Explorer under https://developers.facebook.com/tools/explorer I can select the permission instagram_content_publish. After click "Generate Access Token" I can login, however, it is asked for an Instagram Business Account (see screenshot). I only have an Instagram CREATOR account.
[![enter image description here][1]][1]
Several docs mentioned it Business and Creator accounts should work with Graph API (e.g. https://developers.facebook.com/docs/instagram-api)
In Meta Accounts Center (https://accountscenter.instagram.com/profiles) I can see both my Facebook and my Instagram account.
Thanks for any hint!
[1]: https://i.stack.imgur.com/dzgqB.png

Facebook Developer App Review - Your submission must include pages_read_engagement to use instagram_basic

Hello Facebook Developers Community,
I am trying to go through the 'Request for App Review' process for which I have completed all the steps besides one which is very confusing and literally has no useful guidance anywhere.
The dashboard shows visual checkmarks on all the steps completed besides the 'Your submission must include pages_read_engagement to use instagram_basic'
Just a brief background on what i am trying to do:
I am only trying to get the facebook developer access approved to go live to use 'Instagram Basic Display' and the api's to allow my application users to connect their instagram account and fetch only single images posted on their account to be displayed with in my application.
We have already gone through the 'Business Verification' process and already have that approved as well as having the facebook business account connect to our instagram account.
the only help i came across was on 'Pages Api' docs which mentions that
'The pages_read_engagement permission allows your app to read content (posts, photos, videos, events) posted by the Page, read followers data (including name, PSID), and profile picture, and read metadata and other insights about the Page. The allowed usage for this permission is to help a Page Admin administer and manage a Page. You may also use this permission to request analytics insights to improve your app and for marketing or advertising purposes, through the use of aggregated and de-identified or anonymized information (provided such data cannot be re-identified).'
https://developers.facebook.com/docs/permissions/reference/pages_read_engagement
for which none of those endpoints I am using or plan on using at all and not sure how it even got added.
I am really not sure what else to do and what pages_read_engagement has to do with my app to be approved.
Any help would be greatly appreciated.
Thanks

Can't Find Specific Permissions to assign on Facebook Application Page - instagram_content_publish permission not found

I am creating some small api to help by business to post images from our CRM to instagram and facebook. Currenty I can find instagram_basic permission to read from instagram but can not find instagram_content_publish from anywhere.
I checked App Review Page From our production which connects to instagram and I also tried to set this permission to my test user on test application and I can not see that from permissions.
Can somebody please tell me why can't I find that specific permission. Without it I can not post to instagram from my app.
Note: Our Facebook page is connected to our instagram account.
As it is documented I have to assign instagram_content_publish in order to create posts on instagram https://developers.facebook.com/docs/facebook-login/permissions/#reference-instagram_content_publish
Image 1: No such permission found for test user
Image 2: No such permission found in App Review For production
Image 3: I can find instagram_basic for test user
You don’t get to see or find that permission, because your app is not among those allowed to use publishing functionality to begin with.
Content Publishing is not available to just any 3rd-party apps at the moment, but only to specific partner companies.
https://developers.facebook.com/docs/instagram-api/guides/content-publishing:
The Content Publishing API is in closed beta with Facebook Marketing Partners and Instagram Partners only. We are not accepting new applicants at this time.
As of January 27th, 2021 you can now publish to Instagram Business type accounts via the Instagram Graph API. Be sure to check out the restrictions in the documentation.
Blog Post:
https://developers.facebook.com/blog/post/2021/01/26/introducing-instagram-content-publishing-api/
API Documentation:
https://developers.facebook.com/docs/instagram-api/guides/content-publishing#endpoints

Instagram API for Non-Business accounts

I want to make a app for Non-Bussiness Instagram accounts.
My only problem is that when I access the old Instagram API (https://www.instagram.com/developer/) they tell me to use the new Graph API, but when I go to the Instagram Graph API reference, they says:
If you are building apps for Instagram Non-Business Accounts, please
use the Instagram Platform API instead.
(Note: The old Instagram API will be deprecated soon: https://developers.facebook.com/blog/post/2018/01/30/instagram-graph-api-updates/)
What can I do to resolve this little problem?
Instagram users can now set their accounts as 'creator accounts'. This allows the same capabilities via the Facebook Graph API as for business accounts, but without actually needing to be a business.
Details here: https://help.instagram.com/2358103564437429

How to access Instagram feed of any user with new Graph API?

Facebook recently introduced Instagram Graph API, which allows to fetch data from Instagram page that is connected to your Facebook company page, instagram.com/developers states:
The Instagram Graph API is Now Available to All Developers.
For Non-Business Instagram Accounts please continue to use the existing Instagram API.
So, for example, if my company has account instagram.com/my_first_company, I can only retrieve its feed and no one else.
Using old Instagram API to retrieve public_content permission (access to any feed) is no longer an option too, from old API documetation:
public_content - to read any public profile info and media on a user’s
behalf (applications no longer accepted)
What will happen to existing tools that have public_content permission? (for example, there are tons of plugins for various CMS that allow to display recent Instagram photos)
Is there any valid way to access public_content (access to any feed) right now (besides fetching HTML pages of Instagram website)?
Are there any plans to enable Graph API for non-business customers, of so when?
UPD. There seem to be ?__a=1 endpoint that allows to get access to recent photos of any public feed without any tokens. But it's not official and no one knows when/if Instagram will close it. If you do - please let me know.
UPD 2. Instagram removed ?__a=1 endpoint, not sure for how long, probably forever. Currently the only way to access instagram feed is to scrap instagram.com website, which is a horror.
Prerequisite: You first need the business Instagram account to be linked with FB Page. https://help.instagram.com/356902681064399 - That one can do from the profile page of Instagram account.
Get the Instagram business account id:
graph.facebook.com/v2.8/<fbPageId>?fields=instagram_business_account. (the fbPageId is the page id of the facebook page the account is linked)
To fetch instagram media feed: graph.facebook.com/v2.8/<igBusinessId>/media to fetch the media feed of the Instagram account. (the igBusinessId is the id returned in above linked instagram_business_account) - This is still owned media as per the page access_token. Not any other user's feed.
All other endpoints (such as comments moderation, detailed insights API) mentioned here works on the business media list returned on above call.
Please note:
This still does not allow to fetch un-authenticated user's Instagram feed. That is not possible via API now. There is no valid way via API to get to public_content scope. There can be few Instagram Marketing partners for which this is enabled. But, in general the scope is deprecated now!
Currently, for FB graph API to work we need linked business page to Instagram account. As above apis uses page tokens.
You can get information about any IG business account using your FB access_token using the business_discovery API as given here.
You must have an IG business account to read other users data like user_info or media details using the id of your IG business account as a node.
Ex:
GET graph.facebook.com/[YOUR-IG-BUSINESS-ACCOUNT-ID]?fields=business_discovery.username(USERNAME){media{caption,media_url,media_type,like_count,comments_count,id}}