In iOS 6, check if a person is registered on a social network?

Is there a way to check if the user is actually logged in to facebook or twitter in the operating system.

The reason I want to do this is to refuse sharing in the application, for example, using the facebook SDK file exchange for this, without asking the user to log in again.

I really thought the code:

[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]; 

did just that, but apparently it only shows a warning if the user is not logged in.

This happens only if the user does not have the Facebook application installed, he does not register in the operating system (in the settings), but enters our application through the SDK for Facebook.

+4
source share
2 answers

What I have for me on the device:

 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {// do something only for logged in fb users} else {//do something else for non-fb users} 

Are you trying to use a device or simulator?

+13
source

Unfortunately, you cannot check if the user is registered correctly. The facebook password may be incorrect and the ( isAvailableForServiceType ) method returns true

0
source

Source: https://habr.com/ru/post/1437541/


All Articles