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 6048637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:29:09+00:00 2026-05-23T07:29:09+00:00

I am trying to retrieve values from Json Object but getting Exception.I am trying

  • 0

I am trying to retrieve values from Json Object but getting Exception.I am trying to fetch my facebook profile info , using facebook graph api.

ProfileRequestListner.java

public void onComplete(final String response, final Object state)
{

    try 
    {
        // process the response here: executed in background thread
        Log.d("Facebook-Example", "Response: " + response.toString());
         JSONObject json = Util.parseJson(response);

        final String name = json.getString("name");



      Bundle b = new Bundle();
       b.putString(SoapboxApplication.FIRST_NAME, name);
      //  b.putString(SoapboxApplication.LAST_NAME,last_name);
       com.android.soapbox.SoapboxApplication.mListener.**ProfileInfoAvailable**(b);
    }

    catch (JSONException e) 
    {
        Log.w("Facebook-Example", "JSON Error in response");
        Log.e("Facebook-Example", "JSON Error in response"+e.fillInStackTrace());
    } 
    catch (FacebookError e) 
    {
        Log.w("Facebook-Example", "Facebook Error: " + e.getMessage());
    }
}

ProfileInfoAvailable(Bundle b) is defined as

public class ProfileInfoListner extends Activity implements ProfileEventListener
{
public EditText mFirstNameTextBox  ;
public TextView mLastNameTextBox;


public void ProfileInfoAvailable(Bundle b)
{
 Log.e("Facebook-Example", "HGGGGGGGGGGGGGGGGGGG"); 

try
{
    for (String key : b.keySet()) 
    {
        if(key.compareTo(SoapboxApplication.FIRST_NAME) == 0)
        {
            Log.e("Facebook-Example", "IIIIFFFFFFFFFFFFFFF");   
            //Assuming mFirstNameTextBox points to the textbox on PRofile screen

            mFirstNameTextBox.setText(b.getString(key));       


        }
        else if(key.compareTo(SoapboxApplication.LAST_NAME) == 0) 
        {

            //Assuming mLastNameTextBox points to the textbox on Profile screen
            mLastNameTextBox.setText(b.getString(key));  


        }
}   
}
catch(NullPointerException c)
{
    Log.e("EEEEERRROOROROROORR",""+c.fillInStackTrace());
}

}   
}

What wrong with that.??
Any help would be highly appropriated.

  • 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-05-23T07:29:09+00:00Added an answer on May 23, 2026 at 7:29 am

    What is null is the EditText mFirstNameTextBox (and the following TextView) also, since you are not initializing them to anything as I can see.

    If you are defining those in an XML file, use a LayoutInflater and the method findViewById() to obtain the reference to those resources.

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

Sidebar

Related Questions

I'm trying to retrieve a file from a server using SFTP (as opposed to
I am trying to retrieve the values from the following url: http://rentopoly.com/ajax.php?query=Bo . I
I'm trying to retrieve JSON data from servlet and display in html. I was
I am trying to retrieve some data from a database using jQuery's $.getJSON method
I am trying to retrieve values from my App.config file which is stored in
I am trying to retrieve multiple values from the session variable in which I
I have been have issues trying to retrieve the values from a treeMap that
I'm trying to retrieve an XML stream from a URL. For most URLs my
Basically I am trying to retrieve a list of stored procedure parameters using Linq
I'm trying to retrieve data from an SQL Server 2000 server, and place into

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.