Get Instagram profile page from an id - swift

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.

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.

Related

How to get link to user's timeline from Facebook Messanger Platform API?

Did I miss sth or it is impossible to get link to user's timeline from Facebook Messenger API?
According to: https://developers.facebook.com/docs/messenger-platform/user-profile User Profile API doesn't return link in fields.
Is there any other option?
You would have to use the User Profile endpoint and use all the information for determining which Facebook user it matches to. If you image match the profile picture and match all the other information, and compare timezone to their location, it is probably possible, but it's probably not easy.
Making a workaround like this might not be a bad idea because Facebook seems to want to keep all the stuff seperate right now, as their user ID's are different for seemingly everything. The User Profile endpoint exists for personalization purposes, but it doesn't identify a user.
The user matching through login might also be useful as a outside of messenger solution, but I'm not sure exactly how that would be done.

get Facebook user ID with username without graph api [duplicate]

I would like to retrieve a Facebook user's id given their username.
Example: Given helloworld return 100003263065603.
I understand that the Graph API does not allow this anymore, but several sites, such as lookup-id and findmyfbid are able to do this.
I am guessing they are doing some sort of scraping? If so, how would I implement this in Node.js
Those sites most likely scrape the profile page, which is not allowed. Don´t do that, should not need to anyway. Just let the user authorize your App and you will get his (App Scoped) ID. There´s no serious application for using the username or his global ID anymore.

Is there API to get someone's facebook profile with out login to facebook?

I was wondering if its possible to get one's facebook profile (to be exact,'profile url') through their API?
I need an api to get fb profile link using a matching email address. I dont want to login to facebook though.I was trying to search for this but it seems you need to log in to facebook to get that.
Any idea or is it feasible?
You need ID of the concerned user which can't be achieved without using the Facebook Login, since Facebook login is the starting point to get the current user info (/me).
Search API could have helped you since you have the email ids of users, but unfortunately this api doesn't support user search with email!
So, answer is simple- NO, you cannot get the ID (profile link) of the user without using the facebook login.
Not that I can think of. Facebook's Graph API gives you some public info but that info given depends on the users Facebook's settings on what is public or not. You could maybe get some users profile picture but not others, making it not a very viable option for practical use. Hope that helps

How can I detect if a certain post on a Facebook page has been deleted?

I am planning to build a small side project that stores posts from particular public pages. And detect if they delete the post later. Something similar has been done for Twitter. But I couldn't find similar projects for Facebook.
Like this: http://politwoops.sunlightfoundation.com/
But for Twitter. I will do it in Python or C#
How can I go about it?
Any particular code or projects I can learn from?
The only way to check if a post is not there anymore on Facebook is to search for it with a User Access Token of the User who posted it. Every Object on Facebook gets a specific ID, you only have to check if that ID still exists. If not, you get an Error from the API.
For example: https://developers.facebook.com/tools/explorer/?method=GET&path=10203433018378479&version=v2.0
The path parameter is the ID of the Post.
Keep in mind that you need the read_stream permission for that, and you need to let Facebook approve it for other users or it will only work for Admins/Devs of your App. It is not very likely that you will get the permission approved for this though. It usually only gets approved for Apps on "Platforms without a native Facebook experience".
Edit: My bad, i was thinking about User posts, but your question was about Pages. In that case, all you need is an App Access Token (App-ID|App-Secret). The API Call would be the same, you just need to know the Post ID.
About Access Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens/
http://www.devils-heaven.com/facebook-access-tokens/
For getting the feed of a Facebook Page, see the Facebook docs (including code samples): https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed/
You can use graph api for this. If it's a public page, you can follow these steps:
Create your application in Facebook developers site
Setup the basic graph auth mechanism with your favorite language and get unexpired token.
Use your unexpired access token to do these tasks:
Enter the id of the pages you want to crawl http://graph.facebook.com/[insert page id or url here]/feed
Add post title, postID to your database.
Create a scheduled task on your server to do these tasks:
Select all / page based etc posts on your database and send a request to: http://graph.facebook.com/[insert post ID here]
if it returns it means it's still there. otherwise it will return an error.

Get users Facebook ID for database

I need the following, any help would be much appreciated.
I Have a registration form.
It inputs the data Name | ID | DOB | TWITTER | FBID
When the user registers it asks for the above values.
Twitter is easy as users can just put in their Twitter ID.
But I Need to get the users Facebook ID in the form.
What would be the best way to do this?
Could i use the 'Connect To Facebook" Feature.
All i need is the Facebook user ID so that i can use it when retiring graph data later on.
I have set up a Facebook Application and am using PHP with a MySQL database.
Thanks
Alex
Well, they have specific APIs for different functions. In your case none of their simple solutions work. You will probably need to use Facebook's Graph API. You should take a look in their PHP SDK. It is a very useful tool. I used it once and it worked perfectly.
You will need to know much, before you get the users is. Also if you want to make that automatically, they will have to be logged in and they will have to confirm access to their personal data from your facebook app.
Good luck!
For any user data you wll need to get permission from user.
You can use Facebook connect.
Make the user log in and get access token, this access token is the key to all user data.
You can use this access token with graph API also.
Check my blog.