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

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.

Related

Get Instagram profile page from an id

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.

Add extended permissions - Facebook

I created a Java program that retrieves users personal information and posts. I can retireve everything related to me but not to my friends.
I know that i have to add some extended permissions to collect information about my friends (e.g. friends_groups, friends_interests, friends_subscriptions and more) but i don't know how to add them.
I didn't use Facebook Api in my Java application. I just give a specific URL, for example :
https://graph.facebook.com/friendID?access_token=MY_ACCESS_TOKEN_HERE
and i get a JSon Object from this URL which contains the information of that user (id, first_name,last_name,link,name,updated_time) which are not useful for what i want to do.
I also tried :
https://graph.facebook.com/friendID?access_token=MY_ACCESS_TOKEN_HERE&scope=friends_activities,friends_birthday,friends_status,friends_subscriptions,friends_work_history
but again it didn't work either to my Java App or Graph Api Explorer.
Can someone explain to me how to add the extended persmissions that i need provided that i created my app in the way i explained above? Can i add the permissions inside the URL that fetches the JSon Object?
To get a person's data, your app needs to use that person's access token. To get that person's access token, that person must authorize your app (through Facebook Login). You can read more about Facebook Login in the documentation.

Get correct id from facebook

I'm trying to get a username from facebook id - I found a way to do it:
https://graph.facebook.com/id?fields=link
however, i noticed that using the graph api, when writing 'me' in the fileds I get a different id from when I use this site :http://findmyfacebookid.com/
And only when using the id from the http://findmyfacebookid.com/ site, the https://graph.facebook.com/id?fields=link works
Anyone knows how to get the id that works every time using the graph api?
Thank you!
Since v2.0 you only get an "App Scoped ID", there is no way to get the "real" ID anymore, and there is no way to get the "username" either. See the changelog for more information.
You should not need the username anyway. If you want to identify returning users, you can just use the App Scoped ID. And if you need to match user between different Apps, you can use the Business Mapping API.

How can I uniquely Identify facebook user

How can I get the global facebook link
https://www.facebook.com/5
using v2.2 of facebook API,
Actually my application needs facebook friends and their globally unique facebook ID, I am thinking to get the friend names using taggable API but how can I get the unique facebook ID? or it is not possible at all ?
If somehow I get this global link for a user, I can extract the global ID
https://www.facebook.com/5
(I know its not possible using their API directly, but there must be some workaround that one can use)
Since v2.0 of the Graph API, you can´t get the global ID or the global link anymore for privacy reasons. You can only get App Scoped IDs, but those are unique in one App and good enough to detect returning users. Also, you can´t get ALL friends anymore, for anything else than tagging or inviting (which is only available for games with a Facebook Canvas implementation). No App should know about users who don´t even use the App.
taggable_friends is for tagging friends only, you are not allowed to use it for anything else and you would need to get it approved by Facebook before going public anyway. And there is no way you would get it approved for anything else.

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.