Get instagram user stories - instagram-api

In my app, user atuhenticates with instagram, and we get an access token!
This is good, and we can access all regular posts. But it seems so unclear how to access the user's stories.
this works for posts:
'https://graph.instagram.com/$userID/media?fields=id,caption&access_token=$accessToken'
Ive tried this for stories:
'https://graph.instagram.com/$userID/stories?fields=id,caption&access_token=$accessToken'
'https://graph.instagram.com/$userID/stories&access_token=$accessToken'

You can use the Graph API in order to list User Stories as mentioned here.
GET graph.facebook.com
/17841405822304914/stories

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.

Getting a users followed and followers list on Instagram

So I'm planning to make an analytics app based using Instagrams API. But i have a quick question since I'm sort of confused on this. On Instagrams documentation i see the following:
follower_list - to read the list of followers and followed-by users (applications no longer accepted)
So let's say the user using my app has authenticated.
Does the above mean that I can't access their, the users, followers and followed lists?
Or does this mean that I can't access the list of "followers" and "followed" other then the authenticated user? (ie the lists of another user that the authenticated user may be following)
Hopefully this makes sense.
I saw the following question posted, but i just want to be sure.
Instagram API - How can I retrieve the list of people a user is following on Instagram
Thanks
As of Oct 1 2017, Instagram is no longer approving following_list permission, so you cannot access authenticated or any user's followers/following. No other solution using official APIs

Get reviews/ratings from Facebook pages without page access token

I am trying to retrieve reviews from the Facebook page, but unable to get reviews as it required the access token.
Is there any way to get reviews from the Facebook page using page id without page access token?
I have found many questions asked earlier for the same thing but that still won't help me.
I also got the answer to getting reviews using places, can anyone know how to do that?
Or is there any paid service for this?
Checked following links but unable to achieve the correct result that I want:
Facebook Access Token for Pages
Get facebook public page rating and review
Thanks
Is there any way to get reviews from the Facebook page using page id without page access token?
No, there is not.
If you do not have admin access to the page, then you can not access the reviews via API.
Or is there any paid service for this?
Any such service would be in violation of Facebook terms, if they acquired that data via scraping.

Error from Instagram: The access_token provided does not match an approved application

This was working fine for many months and now it's just a blank space. I get the following error: Error from Instagram: The access_token provided does not match an approved application. How can I get a new access_token for an existing client??
You need to check you application hasn't been put into sandbox by Instagram. They made big changes to their API on the 1st of June and if you had it submitted your app for review it will be put in sandbox mode and only sandbox users will be able to use it.
Even if you are not in sandbox mode you may need to get your users to reaurhorize your app due to new scopes being used to control access to everything other than basic user information.
Check Instagram Developer Docs for more information on the changes
You need to check your Access token's Scope and asking for login permission
where some new Scope had been added ex:public_content Added. Also don't forget to check for requirements Scope for API you are using and if it's need and Authentications "Valid access Token". where also had some changes.
basic - to read a user’s profile info and media
public_content to read any public profile info and media on a user’s behalf
follower_list to read the list of followers and followed-by users
comments - to post and delete comments on a user’s behalf
relationships - to follow and unfollow accounts on a user’s behalf
likes - to like and unlike media on a user’s behalf
And take look about **Sandbox API behavior of your application not life yet :**
API Behavior
The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
Reduced API rate limits
The first point is important and it means that the API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.
For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.
As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.
Good luck
The following video clearly explains what steps to follow to get this working with the new auth
https://www.youtube.com/watch?v=0k4RhTS94Hw
Kind Regards
Sandeep Sahoo

Facebook endpoint to get user's feeds/posts

So I want to get a user's feeds (or lets say user's posts); based on this documentation I'm calling the following endpoint:
https://graph.facebook.com/{USER_ID}/feed?access_token={MY_ACCESS_TOKEN}
https://graph.facebook.com/{USER_ID}/posts?access_token={MY_ACCESS_TOKEN}
But this is giving me an empty data array; although there are public posts by the user! Am I doing something wrong? Should the user give the permission to my app?
Although the following end point works (which shows user general info), but that's not what I want; I want just a user's posts
https://graph.facebook.com/{USER_ID}?access_token={MY_ACCESS_TOKEN}
Thanks
You have to use facebook login and request permissions from the user to access their posts : "user_posts". This document covers how to request permissions with faceboook login. Once you are granted the user_posts permission, you can use the access token you obtained from the user in your call to get the users feed.

Resources