I cannot find many examples of the FB + Android SDK and the samples are not simple enough(some of them are deprecated). My simple goal is to share some content on FB using my Android app. When I developed the iOS app it was simply
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate facebookLogin];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"pikSpeak", @"name",
shareURL, @"link",
@"pikSpeak for iPhone !", @"caption",
@"Record audio at the moment of the image taken using pikSpeak and feel the moment come alive", @"description",
@"shared an audible pic using pikSpeak cam", @"message",
imageURL,@"picture",
nil];
[[appDelegate facebook] requestWithGraphPath:@"feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
This code handled the sessions and saving the session details over app restarts.
1) How to simply share some thing in Android.
2) I saw Facebook(String app_id)
is deprecated. If so, then what is its replacement?
P.S. : Using Facebook 3.0 SDK
Facebook
class is mostly theSession
class in Facebook 3.0 SDK. See this tutorial: developers.facebook.com/docs/tutorials/androidsdk/3.0/… – Tushar