Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:02:26+00:00 2026-06-13T20:02:26+00:00

Using titanium, does anybody have some simple instructions to get the user’s facebook name,

  • 0

Using titanium, does anybody have some simple instructions to get the user’s facebook name, once signed into facebook?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:02:27+00:00Added an answer on June 13, 2026 at 8:02 pm

    Ah, here is how you do it:

    function getFacebookInfo(){
        Titanium.Facebook.requestWithGraphPath('me', {}, 'GET', function(e){
            if (e.success){
                var jsonObject  = JSON.parse(e.result);
                //do something here with these values. They cannot be passed out of this
                //function call... this is an asynchronous call
                //that is, do this:
                saveToDb(jsonObject.first_name);
            } else {
                //some sort of error message here i guess
            }
        });
    
    };
    

    Finally, along with name and username, check out the facebook page for the other variables you can get –

    http://developers.facebook.com/docs/reference/api/

    FINALLY: be aware that this is a callback, and titanium won’t actually wait for this call to finish. That is, any variable declared to hold the results the returned after the requestWithGraphPAth will immediately return, and as a result almost always be empty.

    I guess you could make a nifty loop that just… loops until some variable is set to false. And you’d set the variable to false in the callback… but that seems dodgy.

    Just make your call back do everything else, that is, save to the db etc etc

    If you do go the route of calling Ti.Facebook.authorise() to log in the user, remember to define

    Ti.Facebook.addEventListener('login',function(e){
        if (e.success){ 
    ...
    ...
        } else if (e.error){  } else if (e.cancel) { }
    }
    

    before the call. And then, in the success bit, you can make a requestWithGraphPath call and so on. I just save all the details to the database and retrieve them each time after that, works fine for me!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using Titanium for an Android application that does some microblogging through
I have recently started creating an iPhone application using Appcelerator's Titanium. Since the application
I'm currently using JavaScript (CommonJS) in Titanium Studio and have a question about prototyping.
I have a JSON that contains the following: {p1:{debris:{titanium:0,silicum:0}},p2:{debris:{titanium:0,silicum:0}}... I declare the data using
Using Titanium Appcelerator SDK 1.7.1 for iOS 4.3 I have a TableViewRow and need
I am using Titanium and have a TableView with about 20 entries, each containing
I am using Titanium to build some mobile apps and I noticed that this
I am using Titanium Appcelerator. can anybody tell me how i can register a
I'm using Titanium Studio (1.0.0.201104272233) and Titanium Developer (1.2.2) and have just begun my
I'm using Titanium to develop an Android app. I have a nested list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.