Skip to main contentdfsdf

Home/ posurderpti's Library/ Notes/ Get User Id Facebook Application

Get User Id Facebook Application

from web site

=


Get User Id Facebook Application

Download

Get User Id Facebook Application

Handmade in Raleigh, North Carolina . alert(response.name); alert(response.email); }); } else { alert("User did not login successfully"); } }, { perms: 'email' }); } shareimprove this answer answered Apr 26 '11 at 1:45 Balakrishnan 79879 thanks.its workable.But i use another simple way to solve it.thx –riad Apr 26 '11 at 9:39 add a comment up vote 1 down vote At last i solve my problem and now i can easily get the facebook user id and email address and other related information.Using this code i can hit to facebook for particular user's authentication and when user accept my application then i can get his/her facebook user id, email and other information into $userinfo array.Hope it will help you. that time it has Facebook class in the facebook sdk –RajaReddy PolamReddy Jul 12 '15 at 4:47 add a comment up vote 1 down vote You can get the user ID with this code : document.getElementById('status').innerHTML = 'Welcome ' + response.name + '!' + " "+ 'Your user ID is : ' + response.id; shareimprove this answer edited Jul 11 '15 at 11:39 answered Jul 11 '15 at 11:03 HQtunes.com 1,38132648 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Stack Overflow Business Talent Ads Enterprise Company About Press Work Here Legal Privacy Policy Contact Us Stack Exchange Network Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica Salesforce ExpressionEngine Answers Stack Overflow em Portugus Blender Network Engineering Cryptography Code Review Magento Software Recommendations Signal Processing Emacs Raspberry Pi Stack Overflow Programming Puzzles & Code Golf Stack Overflow en espaol Ethereum Data Science Arduino Bitcoin more (26) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law more (16) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling Motor Vehicle Maintenance & Repair more (32) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more (10) Meta Stack Exchange Stack Apps API Data Area 51 Blog Facebook Twitter LinkedIn site design / logo 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . Profile profile = Profile.getCurrentProfile(); System.out.println(profile.getFirstName()); System.out.println(profile.getId()); shareimprove this answer edited Apr 29 '15 at 12:08 answered Apr 3 '15 at 17:21 Deepika 52645 2 This is the right way in FB SDK 4.0 –vishal dharankar May 16 '15 at 11:01 add a comment up vote 7 down vote loginResult.getAccessToken().getUserId() shareimprove this answer edited Mar 14 '16 at 5:42 Irshad 2,40451838 answered Mar 11 '16 at 19:37 Jonathan Caicedo 9626 for some reason Profile profile = Profile.getCurrentProfile(); and profile.getUserId() is not working with current sdk. Company About Us Contact Us Testimonials Affiliate Program Our Plugins Before & After Pro Company Directory Pro Custom Banners Pro Easy FAQs Pro Locations Pro Easy Testimonials Pro WP Social Pro Documentation Sitemap Frequently Asked Questions (FAQs) Terms of Use Privacy Policy GoldPlugins.com, 2017. What's this all about?. It should look something like this: . –riad Apr 26 '11 at 9:36 add a comment up vote 2 down vote First of all, your code is "badly" written. Then, copy the URL from your browsers address bar and come back here to try again. Unfortunately, they make this very difficult to find, especially if you have a so-called "vanity" personalized profile URL. shareimprove this answer answered May 16 '15 at 10:56 vishal dharankar 4,06943357 add a comment up vote 2 down vote The Facebook graph API lets you make calls that return JSON, which you can parse in Android with a JSONObject like this below code. .. JSONObject me = new JSONObject(fb.request("me")); String id = me.getString("id"); shareimprove this answer answered Mar 22 '13 at 10:42 RajaReddy PolamReddy 16.6k1686149 #RajaReddy PolamReddy: how did you define the variable fb? And are you referring to the 3.0 SDK (or 2.0 with the deprecated Facebook class)? –PeteH Jun 27 '13 at 15:36 it's a old facebook sdk . So, this is the best solution currently. ProductsFacebook LoginSharing on FacebookGamesFacebook App Ads. Learn more, including about available controls: Cookies Policy.FacebookJoin or Log Into Facebook Email or PhonePasswordForgot account?Log InDo you want to join Facebook?Sign UpSign UpThis page isn't availableThe link you followed may be broken, or the page may have been removed.Go back to the previous page Go to News Feed Visit our Help CenterEnglish (US)NederlandsFryskPolskiTrkeDeutschFranais (France)EspaolPortugus (Brasil)ItalianoSign UpLog InMessengerFacebook LiteMobileFind FriendsPeoplePagesPlacesGamesLocationsCelebritiesMarketplaceGroupsRecipesSportsLookMomentsInstagramLocalAboutCreate AdCreate PageDevelopersCareersPrivacyCookiesAd ChoicesTermsHelpSettingsActivity Log Facebook 2018. However in general it would be better to use javascript sdk for login alone (faced the same issue in asp.net). Stack Overflow works best with JavaScript enabled .. Not the answer you're looking for? Browse other questions tagged android facebook facebook-android-sdk or ask your own question. For example: FB.init({ appId: , cookie: true, status: true, xfbml: true }); function fblogin() { FB.login(function (response) { //Control comes back here if (response.session) { alert(response.session.accesstoken); var url = '/me?fields=name,email'; FB.api(url, function (response) { //You are now in the same page with the data you wanted. Still struggling? If you are logged into Facebook in your current browser, you should be able to click this link, and it will redirect you to your profile page. Stack Overflow Questions Developer Jobs Tags Users current community help chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. What's my personal profile URL?. All of our plugins include one year of free updates and our world-class support. Just see my code below: '########', 'secret' => '##########################', 'cookie' => true, )); $reqperms = "publishstream,offlineaccess,userstatus,email,readstream"; $session = $facebook->getSession(); $loginUrl = $facebook->getLoginUrl(array('canvas'=> 1,'fbconnect' => 0,'reqperms' => $reqperms)); $userinfo = null; if (!$session) { echo " top.location.href = '$loginUrl'; ";exit;} else{ try { $userinfo = $facebook->api('/me'); } catch (FacebookApiException $e) { echo " top.location.href = '$loginUrl'; "; exit;} } ?> "; echo "Hi $username ! Your E-mail Address is: ".$userinfo['email']." "; echo "Thanks for accepting our application."; //printr($userinfo); ?> shareimprove this answer answered Apr 26 '11 at 9:34 riad 2,905184764 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Your Facebook personal profile URL is the the URL you get to when you click on your name in the upper left of the Facebook home page. android facebook facebook-android-sdk shareimprove this question edited Jul 1 '13 at 4:36 RajaReddy PolamReddy 16.6k1686149 asked Mar 22 '13 at 10:32 Anupam 2,115154476 add a comment 8 Answers 8 active oldest votes up vote 4 down vote accepted After successful login, you need to call following code. Stack Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Stack Overflow Business Talent Ads Enterprise Company About Press Work Here Legal Privacy Policy Contact Us Stack Exchange Network Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica Salesforce ExpressionEngine Answers Stack Overflow em Portugus Blender Network Engineering Cryptography Code Review Magento Software Recommendations Signal Processing Emacs Raspberry Pi Stack Overflow Programming Puzzles & Code Golf Stack Overflow en espaol Ethereum Data Science Arduino Bitcoin more (26) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law more (16) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling Motor Vehicle Maintenance & Repair more (32) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more (10) Meta Stack Exchange Stack Apps API Data Area 51 Blog Facebook Twitter LinkedIn site design / logo 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. –Ege Kuzubasioglu Feb 28 '17 at 13:51 add a comment up vote 4 down vote You should be used new facebook sdk 3.0 and Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data); if (Session.getActiveSession().isOpened()) { // Request user data and show the results Request.executeMeRequestAsync(Session.getActiveSession(), new Request.GraphUserCallback() { Override public void onCompleted(GraphUser user, Response response) { // TODO Auto-generated method stub if (user != null) { // Display the parsed user info Log.v(TAG, "Response : " + response); Log.v(TAG, "UserID : " + user.getId()); Log.v(TAG, "User FirstName : " + user.getFirstName()); } } }); } } shareimprove this answer edited Oct 4 '17 at 3:31 Vasily Kabunov 2,79492635 answered Jul 1 '13 at 5:28 Ketan Mehta 269111 where will we start the activity ? You shared what we should do at the end, but could you please show me where to start intent? –alicanbatur Dec 12 '13 at 14:11 executeMeRequestAsync is deprecated. It means that something went wrong in your try block (a.k.a bad Facebook Call). Here is the link: Facebook Login Button Please help me in getting userID from the same login button. Email Sign Up or sign in with Google Facebook How to get FB User ID using Facebook Login Button in android application Ask Question up vote 9 down vote favorite 4 I'm developing an application in which I'm using Facebook log in button from SDK. Stack Overflow works best with JavaScript enabled .. Use newMeRequest instead –Muzikant Feb 14 '14 at 10:13 add a comment up vote 3 down vote Based on answer from Ketan Mehta ( that uses a deprecated API, you should use the following code: Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data); if (Session.getActiveSession().isOpened()) { // Request user data and show the results Request.newMeRequest(Session.getActiveSession(), new GraphUserCallback() { Override public void onCompleted(GraphUser user, Response response) { if (null != user) { // Display the parsed user info Log.v(TAG, "Response : " + response); Log.v(TAG, "UserID : " + user.getId()); Log.v(TAG, "User FirstName : " + user.getFirstName()); } } }).executeAsync(); } } shareimprove this answer edited May 23 '17 at 11:33 Communityf 11 answered Feb 14 '14 at 10:12 Muzikant 6,07333770 add a comment up vote 3 down vote As these all answers are for older SDK , for SDK 4.0 here is the code loginButton.registerCallback(callbackManager, new FacebookCallback () { Override public void onSuccess(LoginResult loginResult) { // App code Profile profile = Profile.getCurrentProfile(); Log.d("facebook",profile.getId()); } Override public void onCancel() { // App code Log.d("facebook","failed"); } Override public void onError(FacebookException exception) { // App code Log.d("facebook","failed"); } }); i was searching for the same thing looks like the Session object is no more accessible so above is the new way to get user profile and user id. Stack Overflow Questions Developer Jobs Tags Users current community help chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list 5a02188284

facebook smileys nur chat
facebook like event javascript
facebook password reset no email
account settings in facebook
how to use different facebook account on candy crush
play slots for free on facebook
pirater facebook startimes2
facebook hacking programs free download
can i block someone from sending me private messages on facebook
download facebook cho ios 4.0

posurderpti

Saved by posurderpti

on Jan 10, 18