facebook,facebook-graph-api,web-crawler , Get Facebook name from id with API/crawler


Get Facebook name from id with API/crawler

Question:

Tag: facebook,facebook-graph-api,web-crawler

I am trying to get Facebook name of user according to his Facebook id.
for example if my Facebook is: Mor Amit
and my Facebook id is: 875810135770071
i want to get the name of the Facebook that is: mor.amit.3
Do you know how can i do it?
Thank you
*I am using java


Answer:

Since you didn't mentioned which language you are using I'll use PHP since its easier and quicker to learn (my opinion).

If you have the ID then this link will take you the user profile:

www.facebook.com/profile.php?id=<user id digits only>

If you have the username then you can use:

www.facebook.com/<user name>

Once you loaded the page lets say using PHP (curl, file_get_contents) you can find inside the content (DOM) using regex - dirty parsing:

Its better to parse the content (you can use - Simple HTML DOM) and then traverse the DOM but that's more complex.

Have fun exploring and learning.


Related:


difference between componentDidMount and getInitialState in Reactjs


facebook,reactjs,flux
I understand that getInitialState is called once in the component's lifecycle and componentDidMount is called when the component is rendered. So does that mean both will get called just once in the component's lifecycle? What's the difference?...

Facebook user to Parse.com


android,facebook,parse.com,facebook-login
How do I get the data from The Facebook user to Parse.com? The code that I will provide below makes a user but it doesn't update it with data when I login, why is it not working? public class LoginActivity extends Activity { private EditText usernameView; private EditText passwordView; @Override...

PHP - Parse Facebook Post JSON


php,json,parsing,facebook-graph-api
I am really struggling with parsing JSON data from Facebook's Graph API. I am using file_get_contents and json_decode to decode the object $json = file_get_contents($facebook_url); $obj = json_decode($json, true); Here is some sample JSON: { "data": [ { "place": { "id": "134972803193847", "name": "University of Southern California", "location": { "city":...

Getting user checkin information based on place_id from Facebook


facebook-graph-api,facebook-checkins
I was wondering if there is any way to get user checkin information for different places based on the place_id. Facebook documentation keeps changing around and I'm not sure if this is possible now? Seems like it was possible in older API versions. Any help will be greatly appreciated.Thanks...

Fetching Data From Multiple Facebook API's then Adding Together


javascript,jquery,facebook
JQuery Snippet // THE FOUR URL'S TO ADD THE TOTAL SHARES var Gal_All = "Link One"; var Gal_S_1 = "Link Two"; var Gal_S_2 = "Link Three"; var Gal_S_3 = "Link Four"; $.ajax({ type: 'GET', url: 'https://graph.facebook.com/' + Gal_All, success: function(data) { showCount(data); } }); var fbshares; var fbcomments; function showCount(responseText)...

Using Graph API Explorer gets friends list but my own app doesn't . (Graph API Explorer token v.s App Token)


facebook,api,facebook-graph-api
I am trying to get my friends list in my app. If I use the access token in my Graph API Explorer console and hit the url. https://graph.facebook.com/v2.3/me?access_token='GraphAPIToken'. I am able to get the complete friends list. If I try using the SDK or any library like fbgraph for nodejs...

Facebook API profile picture


javascript,html,css,facebook,facebook-graph-api
I created a website for my Students Organization. On that website there is a page where I list all the people who helped organize our Activities. Theres a picture of every member there. To get the images, I used their facebook profile pictures. I used http://graph.facebook.com/USERNAME/picture?height=250&width=250 This code did work...

Unable to share message in Facebook API 4.0, with error : Error publishing message


android,facebook
Currently using Facebook 4.0 API, I try to publish message, but I receive the error as following: Error: Error publishing message Looking for help on this issue. private CallbackManager callbackManager; private ShareDialog shareDialog; private FacebookCallback<Sharer.Result> shareCallback = new FacebookCallback<Sharer.Result>() { @Override public void onCancel() { Log.d("HelloFacebook", "Canceled"); } @Override public...

How to easily use the Facebook API Realtime Updates feature?


javascript,php,facebook,facebook-graph-api
First off, apologies for posting yet another question on Facebook Realtime Updates. I have read many existing stackoverflow answers and useful articles which helped, but I still can't seem to figure out how to put everything together. Also, this is the first time I use Facebook and it's API, so...

Bluemix authentication ios8 with google and facebook


facebook,authentication,ios8,bluemix,google-authentication
I am trying to implement two types of authentication from an iOS8 device in the bluemix platform. I succeeded in adding one type of authentication: google. I am using a ADVANCED MOBILE ACCESS module, and I am at the User Authentication part. It looks from a dashboard like I can...

Getting the another title on Facebook SignIn button?


ios,facebook-graph-api
![on facebook sigin button im getting the login with Facebook title.Actual my button is Sign in with facebook]

Facbook Friends Likes count for a page in html


html,angularjs,facebook,social-likes
I want To Display count that number of friends liked a page in html anyone please tell me and i know by using simple url we can get the page likes but i want know how to get the count of friends who liked a page and that too i...

Creating a website for a restaurant with facebook api [closed]


php,facebook,facebook-graph-api
I've my own webdevelopment company and I have a new customer this week who wants to have a facebook API on his site. I've worked with the API before for my personal website but never with a customer. And my question was what is the best way to get a...

Facebook logout iOS SDK


ios,objective-c,iphone,facebook
In the latest SDK of Facebook for iOS 8, the login button itself changes to logout once the user logs in successfully. I have a separate logout button in my applications. When the user is successfully logged in using my own server credentials, google+ or facebook, the app takes the...

login with facebook and capture photo via Camera and share on own wall


java,android,facebook,camera
I searched many sites, but I still can't solve this issue, the problem is that I can't seem to be able to post the data. My code: public class MainActivity extends Activity { // Your Facebook APP ID private static String APP_ID = "397909153726269"; // Replace with your App ID...

django get the social token form allauth


python,django,facebook
Hello i tried to get the social token from the DB but i get this error. I can't find any answer to this and tried everything i can think of. Please if anyone knows how to fix this. NameError at / name 'user' is not defined Request Method: GET Request...

Opening facebook in a panel of winforms


c#,multithreading,facebook,panel,process.start
I am in need to open facebook(whatsapp,skype etc) with in a panel. please suggest something to achieve the same. I working on windows 7. If facebook is not possible then please suggest with whatever the task is possible whether with facebook messenger,whatsapp (site or app),skype or any other social networking...

Facebook Android API asks for additional permission


android,facebook,facebook-graph-api
I am using v2.3 api here I can login with Facebook login button. Now how can I call additional permission on click? I have looked through answers for this question, but all of them look to be back-dated. Can someone show me the right way of asking for addition permission...

In Facebook marketing API, where to set target URL of an Ad Campaign


facebook,facebook-graph-api,facebook-ads-api
I would like to create an Ad Campaign with the Marketing API but I don't know where I can set the target URL of this campaign. I can set the objective of the campaign to WEBSITE_CLICKS but where to set the URL it will goes to? If I use the...

Agree to my privacy policy when sign up to my site via facebook


facebook,privacy,policy
My site has privacy policy and terms of service, when user registered required to agree to both of them. But also I have option of sign up with facebook. Do user required to agree to my privacy policy and terms of service when signing up to my site with facebook?...

need a neat way to create a dynamic facebook sharing technique with custom parameters


jquery,facebook
Since Sharer's ability to accept custom parameters is dead which was the easiest way for a noob like me, I am a bit puzzled with all the FB.ui n OGP talk everywhere. I am not sharing via any app. So do not suggest a method that needs any app_id. I...

Facebook Debugger Returning “Document returned no data”


facebook,facebook-graph-api
Recently I noticed that Facebook's Object Debugger was unable to scrape any pages of my website. After troubleshooting and scouring the internet, I'm at a loss for what might be causing this bug. Whenever I attempt to fetch a new scrape of my website, the following error is returned: Error...

Facebook Marketing API some field are not shown


facebook,facebook-opengraph,facebook-ads-api
I have a development level access to Marketing API and it looks like I cannot read some fields of specific objects. For example I try the following call: You can see that promoted_object, link_url and object_url are not displayed in the result. And I should have one of those three...

how to share screenshot to Facebook


objective-c,facebook,facebook-sdk-4.0,social-media
I've already done that screenshot part, but still haven't found any solution to share the screenshot image to Facebook by using FBSDKSharePhoto. Facebook doesn't provide enough references for it. Can anyone please guide me here? Here is my screenshot code just in case: CGRect screenRect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContextWithOptions(screenRect.size,...

Login with Facebook option trigger suggest to download an app


android,ios,facebook,osx,login
Yesterday I logged in to Airbnb with my Facebook account on my OSX. Shortly later I got a notification both on my iPhone and computer saying "Airbnb is available to install on your iPhone" My question is, does anyone here know how this was done? Is this a feature available...

Facebook LogIn and Parse


android,facebook,parse.com,facebook-javascript-sdk
I've just added Facebook login to my app, I can retrieve the data I need. But I'm not completely sure what to do with it. My app already works with normal users to Parse.com (which I registered on a register screen that I have created in my app). But what...

IOS: Easy Facebook SDK email retrieval Objective C


ios,facebook,facebook-graph-api
EDIT (Rewording the Question because it didn't make sense before.) I have a loginViewController that has he following IBAction: -(IBAction)fblogin:(id)sender { FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logInWithReadPermissions:@[@"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { if (error) { // Process error } else if (result.isCancelled) { // Handle cancellations } else...

Does Facebook allow preloading a specific message from a user to a page?


facebook,webintents
I know that Facebook allows web intents of sharing URLs, along with the ability to select whether it goes into a message, or to your wall, but I was wondering if there is an ability to do something where a user can click a link/button, and it opens up a...

share on facebook: to use a different url in the open graph tags


html,facebook,facebook-opengraph,opengraph
I have a superheroes quiz game at this address: mysite/index.html, the quiz has 2 possible results mysite/result1.html and mysite/result2.html. Each result page has the open graph tags as: <meta property="og:type" content="website" /> <meta property="og:title" content="Great you are Superman" /> <meta property="og:description" content="Description of Superman" /> <meta property="og:url" content="mysite/result1.html" /> <meta...

angularjs ngfacebook batch request


angularjs,facebook,facebook-graph-api
Can anyone who knows how to use the angularjs ngFacebook module help me to perform a facebook batch request? Is it possible to do it with this module? What I need exactly is to get the user events from facebook, for that I have to do 4 different request: $facebook.api('/me/events/attending').then(function(response)...

Facebook - “Cannot query users by their username” solution


android,facebook,facebook-graph-api,facebook-graph-api-v2.2
I am developing an android app. I was using a HttpURLConnection to get profile pictures of facebook users. The URL looks like this: http://graph.facebook.com/?ids=username1,username2,username3&fields=picture&type=square But now, since v2.2 doesn't let me to get profile pictures of users who are not using my facebook app, it throws an error: { "error":...

Facebook Graph API(Version 2.3) publish event on a page from CRM plugin/wflow using C#/JS


facebook-graph-api,dynamics-crm,dynamics-crm-2015
In FB Graph API version 1 we had written a plugin and some js which used to push details of our campaign record in CRM to a predefined FB page as an event. Now in Version 2.3 the publishing endpoint is missing from the GRAPH api.(events) My questions are 1)...

facebook post on page wall - PHP SDK


php,facebook,facebook-graph-api,facebook-php-sdk
I'm trying to create a script that post on a facebook page (as an administrator) a status. This is the script i'm using: try { $access_token = (new FacebookRequest( $session, 'GET', '/' . $pageID, array( 'fields' => 'access_token' ) )) ->execute()->getGraphObject()->asArray(); $access_token = $access_token['access_token']; $page_post = (new FacebookRequest( $session, 'POST',...

Facebook Permission Graph API


php,facebook
try { $response = (new FacebookRequest($session, 'GET', '/me/permissions'))->execute(); $object = $response->getGraphObject() -> asArray(); echo '<pre>'; print_r($object); echo '</pre>'; //problem lies over here for($i = 0 ; $i <count($object['data']); $i++){ echo "<br>" . $object['data'][$i] -> permission; } } catch (FacebookRequestException $ex) { echo $ex->getMessage(); } catch (\Exception $ex) { echo $ex->getMessage();...

Access Token of Facebook changed by user, How to get call back for Access Token?


android,facebook,facebook-access-token,android-facebook
I am using Facebook SDK 4.2. I have implemented AccessTokenTracker interface, which is working if token is changed. My question is : If user got publish_permission for post something from Android app. Then I remove that permission from my Facebook account. Now in app, the token return from AccessToken accessToken...

I need to retrieve facebook user language with php


facebook
I'm building a very simple facebook app in which i would like to retrieve the facebook user language. Since now, i retrieve the browser language to give the right language for the user but I think that retrieving the facebook user language is better and more precise. Is there someone...

Graph API get user id facebook


facebook,facebook-graph-api
How can I do this? Im using Graph API v2.3 I am able to get the access token, but I don't know how to get the user's ID....

Facebook SDK 4.2 FBGraphUser protocol update


ios,facebook,facebook-graph-api
I am working on an Xcode project that has Facebook SDK 3.1.4. I am currently updating the SDK to 4.2. I was just wondering if someone can help me with the update related to FBGraphUser protocol and how I can update that for Facebook SDK 4.2. I have looked around...