Instagram hashtag search permissions - instagram

I downloaded a jQuery plugin a while back that worked really well in displaying posts from a particular hashtag from instagram. Since the recent updates to instagram, the hashtag search returns an error
“This client has not been approved to access this resource.”
I have been told that I need to get permission to now access a specific hashtag, but since this is not an app and I am not the developer, how do I go about doing that specifically?

You have to have access to Instagram account otherwise you cannot do anything.
By the way, you have that jQuery plugin? Maybe I can take a look at it and help you with that.

To get this level of information you will need a developer account with Instagram and then get the appropriate token for accessing this information through the API. The scope will need to set correctly during the oauth2 generation of the token, it will probably need the "public_content" scope.

Related

Permissions and Features

I need to build a app with some specific details, and since I never worked with Instagram I have no idea if is possible or not, and also the information that I find on the docs doesn't say much, so hope someone had the same experience.
So basically I need to track some analytic information, for example in my App, for someone to register it needs to login in Instagram and than must follow my Instagram page, I believe this is possible, but then I need to track some information from the users and that is:
Check if the user is hashtaging my company page (to check which users made more shares or something);
Check which users had more engagement;
Can someone tell me if this is possible to track on Instagram API?
The new Instagram graph API is very limited, you cannot make to app and allow user to follow, you cannot access other user posts to check if they hashtagged or engaged.
All you can do is, access only your posts (if business account), and you can access your post's comments. You can also get last 24hrs of an hashtag, but no user info is given.

Instagram API - How to build a media viewer to get posts by hashtag from some users?

Is it possible? I have read the documentation but I wish to know there is one way. I need to create a gallery with some hashtags and filter by some users. Maybe something in the backend can do it?
No. From the official api, you can't get other users' media anymore. They only allow developers or users to fetch their own "RECENT" media. So does hashtags.
More and more restrictions and fewer and fewer APIs opened by Instagram, it's hard to do valuable stuff around IG now.
It is possible. The developer client key defaults to your own content in sandbox mode. You have to create a submission for approval, you can do this via: https://www.instagram.com/developer/clients/ and choose the client that you have created, then the permissions tab will allow you to apply.
I am going through the application process at the moment for our App, it is very difficult as Instagram are stringent.

Instagram public_content permission

My app worked for a year and then the API calls to instagram stopped returning any data.
I use the following instagram endpoint:
https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=MY_TOKEN
I noticed I need the public_content permission but.. what Instagram requires in order to give me this permission? I couldn't understand anything from the documentation and they dissapproved my request for this permission.
The Instagram API Platform can be used to build non-automated, authentic, high-quality apps and services that:
Help individuals share their own content with 3rd party apps.
Help brands and advertisers understand, manage their audience and
media rights.
Help broadcasters and publishers discover content, get digital rights to media, and share media with proper attribution.
Best way to get public content permission is register an client application follow in one of those tree categories above, fill use case carefully with an screencast of you application and cross your fingers ;).
Leonel's answer is not correct. You get the public_content scope for your app by re-requesting an auth token with that additional permission. This has nothing to do with Sandbox mode or Live mode. This can be done for Live and Sandbox apps, but inclusiveness of the results will be determined by which mode you are in. Even when you have public_content scope for a Sandbox Mode app, you can only see the public content from sandbox users you invite to your client.
So Leonel is partially correct in the sense that the permissions problem may not even matter to you if you cannot get your client approved.
Read this short explanation of Instagram scopes and modes.

Instagram - media liked by a user in Sandbox

Querying the Instagram API in Sandbox mode for getting the media liked by the user related to the token, I get no data. Of course the user is authorized to use the App in Sandbox.
GET: https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN
(Indeed the ACCESS-TOKEN part is substituted with the real token get after the Authorization.)
Response: {"pagination": {}, "meta": {"code": 200}, "data": []}
Am I getting nothing because is in Sandbox mode or am I missing something?
Sorry, I couldn't comment under your question because I don't have 50 reputation yet. However, if you have not submitted your app for review yet, then you don't have the public_content scope, which is required if you want to use the endpoint https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN.
According to Instagram API Documentation:
The OAuth 2.0 specification allows you to specify the scope of the access you are requesting from the user. All approved apps have basic access by default, but if you plan on asking for extended access such as reading public content, liking, commenting, or managing friendships, you will need to specify these scopes in your authorization request. Note that in order to use these extended permissions, you must first submit your app for review.
After you have gained permission to public_content, then you should be able to get the dataset from Instagram.
Did you figure it out? I had the same issue with #tags and just popped this in the browser.
https://api.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=public_content
The main factor being the scope=public_content.
Obviously you need to change the capitalised parts, but that should get you what your after.
Seeing as you are in sandbox mode and only requesting liked media, I thought Instagram wouldnt require app approval?

How to add Instagram feed using HTML or Javascript

So I'm trying to add an actual Instagram feed to my wordpress site. I dont want to use a 3rd party site which doesnt drive traffic to the actual IG site. I've been on the IG developers site and to be honest kind of confusing. Any help would be greatly appreciated.
I would recommend using a plugin to do the hard work, since there are many out there, and integrating the instagram yourself could be a challenge. A quick google search gave me this one:
https://wordpress.org/plugins/instagram-feed/
If you don't want to use a plugin, you need to understand how the api works.
The instagram API requires OAuth authentication for most calls.
First, You will need to register an application on the https://instagram.com/developer/ site in order to obtain a client Id.
Once you have a client Id, you need to establish a flow for users who visit your site. There is no way around this for API calls requiring authentication.
First, the user needs to login and allow access from your account using the instagram api request url:
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
CLIENT-ID is the id you obtained earlier, and REDIRECT-URL should be your wordpress site.
Calling this url will allow you to obtain an access token for the user on your site, and you can then make authenticated calls to the API using that token.
One way around this is to make simple calls that don't require authentication, using tags that are specific to your photos. That is described in this SO question:
Instagram API and importing photos without server side authentication
Cheers,
I agree with Felipe. If you or your client need an Instagram plugin, the easiest way would be to buy it at some marketplace. What’s more important, it is much cheaper than wasting your own time on developing one. Of course, that applies to commercial development, not something that you do for fun.
Here’s a list of plugins that I’ve installed to my clients and was happy about:
https:// wordpress.org/plugins/instashow-lite/ - lite version of the
premium plugin. The functionality is really limited, but it would be
enough to give you a simple display.
https://codecanyon.net/item/instagram-widget-wordpress-plugin-for-instagram/11170758 - a simple commercial widget to display your Instagram
account on a webpage.
https://elfsight.com/help/how-to-embed-instagram-feed-widget-on-html-website/ -
an interesting cloud solution for websites on any CMS. It’s got a demo and a
free plan.

Resources