I am using Facebook Connect for sharing something on my appliction. So I want to implement the Facebook Connect API with 2 buttons, “Login / share on Facebook” via UIACtionSheet.
Now, I have some questions:
Assuming I have 2 buttons on the UIActionSheet with title of “Share on Facebook” “Login”.
I want, when the user have logged in on Facebook, my login button title to change to “Log Out”.
I know I should use this function:
- (void)session:(FBSession*)session didLogin:(FBUID)uid {
//a code that change my login button title to LogOut
}
2- I have logged in Facebook. When I am going to go out from my applicaton and again open the application I should login again! How could I prevent this?
3- Finally I want to share some text from UIWebView to Facebook. My webview outlet names “myWeb”. How could I connect Facebook Connect with UIWebView to share it?
Should I use
-(void)publishFeed:(id)target
?
Use [session resume] which returns YES if the user have used your application, otherwise it returns NO.
By using this mehhod there is no need to do login again.