Re: [android-developers] Fetch user facebook information (Facebook integration application)

2011-03-24 Thread Robin Talwar
my query was related to how to use facebook for android sdk and
fbconnect.jar file
now how in this world isnt it related to android.

anyways i got my solution i had to check log in onComplete

On Thu, Mar 24, 2011 at 9:30 AM, TreKing treking...@gmail.com wrote:

 On Wed, Mar 23, 2011 at 7:26 AM, Abhishek Talwar 
 r.o.b.i.n.abhis...@gmail.com wrote:

 My application uses fbConnect.jar.


 This group is for the Android SDK.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Fetch user facebook information (Facebook integration application)

2011-03-23 Thread Abhishek Talwar
Hey guys
My application uses fbConnect.jar.
and i am able to show the pop up to the user when user clicks the
facebook button.
User wil login with user id and password and can even post the data .

What i am not able to fetch is the user information like its email
address or user picture , sex , age .
I am not able to store the session id and how to interact with graph
api.

Following is my code which i use after adding the fbconnect in build
path



private Facebook facebookClient;
String information;
Button fb;
//** Called when the activity is first created. *//*
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

fb = (Button)findViewById(R.id.fb);
fb.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
whenFbPressed();

}
});



}


@Override
public void onCancel() {
// TODO Auto-generated method stub

}

@Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub

if (values.isEmpty()) {
return;
}

if (!values.containsKey(post_id)) {
try {
Bundle parameters = new Bundle();
parameters
.putString(message, is 
Listening to   );// the

  parameters.putString(attachment,
  {\name\:\My Test Image\, + 
\href\:\ +
  http://www.google.com; + \, +
  \media\:[{\type\:\image\,\src\:\ +
  http://www.google.com/logos/mucha10-hp.jpg; +
  \,\href\:\ + http://www.google.com; + 
\}] + });

parameters.putString(attachment, 
{\name\:\ + Abhishek
+ \, + \href\:\ + 
www.google.com + \}] + });

facebookClient.dialog(this, stream.publish, 
parameters, this);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}

}

@Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
System.out.println(Error:  + e.getMessage());
}

@Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
System.out.println(Error:  + e.getMessage());

}

public void onClick(View v) {
if (v == fb) {
facebookClient = new Facebook(103931556876);
// facebookClient = new Facebook(175729095772478);
// replace APP_API_ID with your own
facebookClient.authorize(this, new String[] { 
publish_stream,
read_stream, offline_access }, 
this);
}
}

public void whenFbPressed(){
facebookClient = new Facebook(103931556876);
// facebookClient = new Facebook(175729095772478);
// replace APP_API_ID with your own
facebookClient.authorize(this, new String[] { publish_stream,
read_stream, offline_access,email }, 
this);



}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Fetch user facebook information (Facebook integration application)

2011-03-23 Thread TreKing
On Wed, Mar 23, 2011 at 7:26 AM, Abhishek Talwar 
r.o.b.i.n.abhis...@gmail.com wrote:

 My application uses fbConnect.jar.


This group is for the Android SDK.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en