2

I have been using Factual Places & Crosswalk API to get Social Media links on some specific places on my iOS app. The API returns proper links for Facebook & Twitter. But for Instagram it just return an id, something like this 79471948.

I was wondering how I can make use of this id. I thought I could use it in a URL, something like this. http://instagram.com/79471948, But this does not exists.

Then I thought the id could be a user-id. If it is a user-id I wanna get the username of the corresponding user-id so that I open his profile page something like this http://instagram.com/79471948. But as we know that Instagram does not allow us to directly request for User Data without OAuth we can't get access token. Without getting access token, I cant get the username.

So do you guys have any suggestions? So the whole thing is, I have this id 79471948 and I wanna open up the corresponding profile without doing any OAuth.

Thanks in Advance.

Madhubalan K
  • 357
  • 5
  • 21

1 Answers1

1

You have to use API to get the user profile from user-id.

https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN

https://www.picodash.com/@ allows you to search for a user-id and view the full profile or open actual instagram.com/username link and view.

enter image description here

krisrak
  • 12,882
  • 3
  • 32
  • 46
  • Hi Krisrak, thanks for reply but still i did not get the profile https://api.instagram.com/v1/users/39605868/media/recent/?access_token=myaccesstoken. gives error like "this user does not exist" – Madhubalan K Aug 24 '16 at 09:58
  • either that user does not exist or that user is private, instagram API does not allow accessing private user data even if u follow or are approved by that user – krisrak Aug 24 '16 at 13:11
  • Actually i get the id from Factual api. example place info is https://www.factual.com/037e34dc-16d2-4a00-ab31-c863523be511 How could i show profile page from Instagram_place ID? – Madhubalan K Aug 24 '16 at 13:18
  • that id is not same as instagram location id, its not that simple, you have to search for the place name in facebook place api and use the facebook place id to get instagram location id, and then make instagram api to get location feed. Picodash has this implemented. – krisrak Aug 25 '16 at 13:06