Open BearBritches opened 7 years ago
as explained to previous instagram users, the access you get is valid only for Your instagram page. You cannot get other instagram feed.
If you get the client_id and access_token correctly you can collect feeds only from your instagram.
I am pulling my account. Do I have the account name in correctly? In the sample document all accounts are listed with “@“ prior, but this is not reflected on instragram’s documentation. Is there additional documentation specifically on setting up a client in instragram? any help would be appreciated, thank you.
On Jun 21, 2017, at 8:14 AM, HartLarsson notifications@github.com wrote:
as explained to previous instagram users, the access you get is valid only for Your instagram page. You cannot get other instagram feed.
If you get the client_id and access_token correctly you can collect feeds only from your instagram.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pavelk2/social-feed/issues/264#issuecomment-310060047, or mute the thread https://github.com/notifications/unsubscribe-auth/AG8la3OCex2GABqAtYfInPxs9qEA2OUgks5sGQklgaJpZM4N_9L0.
account generally have a @ in front of the page name
the syntax you need to follow is the syntax of social-feed app.
and if you look inside the js code in the instagram part you will see:
switch (account[0]) {
case '@':
var username = account.substr(1);
url = Feed.instagram.api + 'users/search/?q=' + username + '&' + authTokenParams + '&count=1' + '&callback=?';
Utility.request(url, Feed.instagram.utility.getUsers);
break;
case '#':
var hashtag = account.substr(1);
url = Feed.instagram.api + 'tags/' + hashtag + '/media/recent/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?';
Utility.request(url, Feed.instagram.utility.getImages);
break;
case '&':
var id = account.substr(1);
url = Feed.instagram.api + 'users/' + id + '/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?';
Utility.request(url, Feed.instagram.utility.getUsers);
default:
is quite clear the use of @, # or &
EDIT:
It seems I missed adding &scope=public_content
.
Explanation here.
@HartLarsson I'm having some issues as well.
This is my configuration:
instagram: {
access_token :"xxx",
access_type : "access_token",
accounts: ["@foo"],
client_id: undefined,
consumer_key: null,
consumer_secret: null,
limit : "10"
}
access_token
is correct (I got it by doing a curl to https://api.instagram.com/oauth/access_token
), client_id
is set but it is being changed to undefined (maybe it's the lib doing it).
I replaced my account with @foo
but I'm the owner of that account so it should display everything correctly.
And I'm getting this on the console:
on this line of the code
@BearBritches @joaovpmamede i just added userId: [your user id] to the options and changed the user.id to options.instagram.userId - works for now but probably not ideal
@joaovpmamede the client_id is a value you setup in the javascript part in the page like:
instagram:{
accounts: ['@YOURACCOUNT'],
limit: 4,
client_id: 'YOURCLIENTID',
access_token: 'YOURACCESSTOKEN'
},
and the parameter is not changed by any script. I've just tested the instagram part and for me works perfectly without any error.
@joaovpmamede i had the same issue. The solution is setting the scope as public_content when requesting the access token: https://www.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT-URI&response_type=token&scope=basic+public_content
I wanted to know if anyone had any thoughts as to why I cannot get the instagram feed to work?
template: "/wp-content/themes/MBU2018/bower_components/social-feed/template.html",
show_media:true,
length:400 //Integer: For posts with text longer than this length, show an ellipsis. }); });