I sharing message in Facebook by integrating sharekit in my iPhone application.I have written the method facebookButtonPressed which I am calling on tapping one button.
First time when facebook screen is appearing its asking for authentication in Facebook . I have given userid and password of my Facebook existing account and tapped for login. Now the facebook authentication screen disappeared.Now again I tapped the button to call the methoed facebookButtonPressed,then I got the message sharing screen.
I don’t want to tap twice to get the message sharing screen.If any one has already solved this issue please help me.
-(void)facebookButtonPressed{
NSString* body = @"test body";
SHKSharer *fb = [[SHKFacebook alloc] init];
SHKItem *item = [[SHKItem alloc] init];
item.shareType = SHKShareTypeText;
item.text = [body length]>140?[body substringToIndex:139]:body;
fb.item = item;
if(![fb isAuthorized])
[fb authorize];
[fb tryToSend];
}
Try the below code, there will be action sheet to select how to share,you need to select Facebook.