Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIActivityViewController when have no Facebook account in settings

I'm using UIActivityViewController, I want to show Facebook option even if the user has not defined a Facebook account in device settings.

In my code, Facebook option not shown when there is no Facebook acoount in settings.

UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];

But, in Safari or more apps there is Facebook option and when click on it - a alert is displayed with "No facebbok account" title and message says "go to settings".

There is any way to add Facebook like this or this possible just for apple apps?

No Facebook Account

like image 898
zeevblu Avatar asked Mar 09 '14 15:03

zeevblu


1 Answers

There's no way to do that using UIActivityViewController. If you check other apps (no apple development) you can see that doesn't use UIActivityViewController but Action Sheets or something else and uses Social Framework. You can check this answer. And check this tutorial if you use Social Framework.

Hope it helps!

like image 106
Sonia Casas Avatar answered Sep 21 '22 11:09

Sonia Casas