120 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
5 star 30
4 star 16
3 star 30
2 star 17
1 star 27
Compatible with
  • iOS

Facebook iOS SDK 4.27.1.0

Xamarin Inc

Build great social experiences and get more installs by adding Facebook to your app.

(Requires iOS 7 or later.)

Integrate with Facebook for your iOS app. Build engaging social apps, enable easy login and get more installs:

  • Share: You can share, send a message, or like content in your app. Also, share Custom Stories with Open Graph.
  • Login: You can sign in to your app with their Facebook Login.
  • App Events: Understand people's actions in your app and measure the effectiveness of your Mobile App Ads.
  • Graph API: Get data in and out of Facebook's social graph. Query data, post stories, upload photos and do other tasks.
  • App Links: Link to a context in your app.

AppDelegate.cs


using Facebook.CoreKit;
//...

// Replace here you own Facebook App Id and App Name, if you don't have one go to
// https://developers.facebook.com/apps
string appId = "Your-Id-Here";
string appName = "Your_App_Display_Name";

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    Settings.AppID = appId;
    Settings.DisplayName = appName;
    // ...

    // This method verifies if you have been logged into the app before, and keep you logged in after you reopen or kill your app.
    return ApplicationDelegate.SharedInstance.FinishedLaunching (application, launchOptions);
}

public override bool OpenUrl (UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
    // We need to handle URLs by passing them to their own OpenUrl in order to make the SSO authentication works.
    return ApplicationDelegate.SharedInstance.OpenUrl (application, url, sourceApplication, annotation);
}

YourViewController.cs


using Facebook.LoginKit;
using Facebook.CoreKit;
//...

// To see the full list of permissions, visit the following link:
// https://developers.facebook.com/docs/facebook-login/permissions/v2.3

// This permission is set by default, even if you don't add it, but FB recommends to add it anyway
List<string> readPermissions = new List<string> { "public_profile" };

LoginButton loginView;
ProfilePictureView pictureView;

public override void ViewDidLoad ()
{
    base.ViewDidLoad ();

    loginButton = new LoginButton (new CGRect (48, 0, 218, 46)) {
        LoginBehavior = LoginBehavior.Native,
        ReadPermissions = readPermissions.ToArray ()
    };

    // Handle actions once the user is logged in
    loginView.Completed += (sender, e) => {
        if (e.Error != null) {
            // Handle if there was an error
        }

        if (e.Result.IsCancelled) {
            // Handle if the user cancelled the login request
        }

        // Handle your successful login
    };

    // Handle actions once the user is logged out
    loginView.LoggedOut += (sender, e) => {
        // Handle your logout
    };

    // The user image profile is set automatically once is logged in
    pictureView = new ProfilePictureView (new CGRect (50, 50, 220, 220));

    // Add views to main view
    View.AddSubview (loginView);
    View.AddSubview (pictureView);
}

Info.plist

In you Info.plist file of your project, go to the Advanced tab and add a URL Type. On the URL Schemes input write fbYour-Id-Here, replacing Your-Id-Here with your app Id.

Controlling the login dialogs

The Facebook SDK automatically selects the optimal login dialog flow based on the account settings and capabilities of a person's device.

If you want to use your System Account of Settings, just change the FB Login's behavior:


loginView.LoginBehavior = LoginBehavior.SystemAccount;

Screenshot generated with PlaceIt.

Release Notes


Version 4.16.1

Modified

  • Updated to use Graph API 2.8

Version 4.16.0

Added

  • Added Settings.GraphAPIVersion static property to allow global setting of different Graph API versions.

Version 4.15.0

Deprecated

  • Deprecated AppGroupAddDialog and AddGroupJoinDialog classes.

Modified

  • The SDK now uses NSURLSession instead of NSURLConnection for making Graph API requests since NSURLConnection.

Fixed

  • PR 836 - pass in correct to login params for webview
  • Fixed crash on iPads when logging out via LoginButton.
  • Return individual photo IDs when sharing photos via ShareAPI whereas previously the SDK would return the photo album post ID.

Version 4.14.0

Modified

  • Updated to use Graph API 2.7

Fixed

  • Replace deprecated UIActionSheet with UIAlertController
  • Fix empty profile picture when all permissions revoked

Version 4.13.1

  • Added missing WeakFrameworks. This fix bug #42139

Version 4.12.0

Added

  • Added ShareAPI.AccessToken property to allow changing the access token used for sharing (pull request 826)

Modified

  • Initial logins will now pass the "rerequest" flag so that previously denied permissions are presented in the login dialog

Fixed

  • Fixed cases where AppEvents could crash because of missing session id.
  • Fixed bug in some cases where access token expiration date was the refresh date.

Version 4.11.0

Added

  • Added AppEvents.LogPushNotification* and AppEvents.SetPushNotificationsDeviceToken methods. See push campaigns docs for more details.
  • Added AppLinkUtility.FetchDeferredAppInvite method to support deferred App Invite app links on iOS, and AppInviteContent.PromotionCode and AppInviteContent.PromotionText properties to make it easy to include a promotion code with the invite.
  • Added Profile.LoadCurrentProfile method.
  • Added HashTag and ShareMediaContent classes to support sharing hash tags and mixed content (e.g., photos and videos).
  • Added ShareLinkContent.Quote property to support sharing quotes from a link.
  • Added ShareVideo.PreviewPhoto to provide a photo to represent the video.

Modified

  • Updated to use Graph API v2.6.
  • Improved session tracking accuracy in AppEvents class, including a configurable value for identifying session timeout thresholds (located in your app's Analytics for Apps settings).
  • The SDK throws an exception if incorrect schemes are configured in the app's plist.
  • Updated xctool and Bolts (v1.7) submodules.

Fixed

  • Fixed scope of static variables in AppEventsDeviceInfo that were incorrectly scoped global.

Version 4.10.1

  • Fixed timezone accuracy for App Events in some affected cases.

Version 4.10.0

Modified

  • App Transport Security whitelisting for Facebook servers is no longer needed.

Fixed

  • Fixed rendering issues for WebDialog (fixed the border alignment).
  • Fixed bug that would overwrite explicit "locale" parameters on graph requests.

Version 4.9.1

Fixed

  • Fixed bitcode support for all frameworks.

Version 4.9.0

Modified

  • Updated Bolts submodule to 1.5 and OHHTTPStubs submodule to 4.6.

Fixed

  • Fixed the LikeControl social sentence to respect locale.
  • Fixed bug in AppEvents that not send attribution in some cases.
  • Fixed LoginButton event to receive WillLogin only at button login.
  • Fixed bug in AppEvents that would not sent events if ActivateApp was sent from a background thread.
  • Fixed login bug that treated a request for no new permissions as a cancellation.
  • Fixed missing Hebrew localization in FacebookSDKStrings.bundle.
  • Fixed some nullable parameters, now can recieve null as value.

Version 4.8.0

Added

  • Facebook.ShareKit.ShareAPI can now share Facebook.ShareKit.ShareVideo content initialized with file URLs.

Fixed

  • Fixed the issue Facebook.ShareKit.SharePhotoContent cannot set peopleIds in Facebook.ShareKit.ShareAPI`.
  • Fixed ShareVideoContent to reject setting peopleIds and placeId (unsupported in Graph API video endpoint) in FBSDKShareAPI.

Version 4.7.1

  • No binary changes were made in this release.

Version 4.7.0

Deprecated

  • Deprecated Facebook.CoreKit.Profile.ImagePath method. Added Facebook.CoreKit.Profile.ImagePath method instead.

Added

  • Added Facebook.CoreKit.GraphRequestConnection.SetDefaultConnectionTimeout static method to allow setting of default timeout value for all requests.

Modified

  • The SDK now targets v2.5 of the Graph API. See for details.
  • The completion results sent to the delegate of GameRequestDialog will now contain a key "to" with a NSArray value containing the recipients.

Fixed

  • Fixed usage of Facebook.CoreKit.ApplicationDelegate.FinishedLaunching in SDK samples.
  • Fixed error that could occur in Facebook.LoginKit.LoginManager using Facebook.LoginKit.LoginBehavior.Web and the login is cancelled.
  • Fixed headerdoc comments on Facebook.LoginKit.LoginBehavior.
  • Fixed orientation issue where SFSafariViewController was not rotating in the login flow.

MessengerShareKit

  • Modified the alert message presented to user when the current Messenger version does not support the share.

Version 4.6.0

Deprecated

  • Several methods on Facebook.LoginKit.Manager and Facebook.ShareKit.AppInviteDialog have been deprecated in favor of new overloads that take a FromViewController parameter. This resolves various presentation issues that can occur on iOS 9.

Added

  • The SDK supports various iOS 9 features including Bitcode. In addition, the SDK dialogs such as Login, Like, Share Dialogs automatically determine the best UI based on the device, including SFSafariViewController instead of Safari.

Modified

  • Added Facebook.LoginKit.ILoginButtonDelegate.WillLogin method and event.

Fixed

  • Fixed Facebook.LoginKit.LoginButton selected style.
  • Fixed Facebook.CoreKit.TestUsersManager crash when test users did not have access tokens.
  • Fixed login bug that could cause some logins to fail with error code 308.
  • Removed old install path from samples' framework search paths.
  • Fix deferred applink handling with click_time specified (github pull request #789: @kookiekrak).
  • Fixed bug that may prematurely dismissing login dialogs when processing error recovery.

Removed

  • Removed armv7s slice from the framework architectures.

MessengerShareKit

  • Updated to support iOS 9, including bitcode.
  • Deprecated Facebook.MessengerShareKit.MessengerSharer.MessengerPlatformCapabilities

Version 4.5.1

Added

  • New sample added

Fixed

  • Fixed bug that could cause crashes when using ios7.

Modified

  • The SDK performs some additional logging in preparation for iOS 9. Please review the Facebook guide to prepare for iOS 9.
  • Facebook.ShareDialog now automatically tries ShareDialogModeBrowser if ShareDialogModeNative is specified and the Facebook App on the device does not support the content.
  • Updated submodules OHHTTPStubs, OCMock, xctool.

Fixed

  • Fixed bug that could cause crashes when logging AppEvents from multiple threads for different events.
  • Fixed bug in GraphRequestConnection where RequestConnectionDidFinishLoading is called even in the case of a network error.

MessengerShareKit

Added

  • Added support for rendering static and animated image as sticker in Messenger. Modified
  • Deprecated MessengerSharer.MessengerPlatformCapabilities in preparation for iOS 9. Rather than checking what Messenger is available, simply send the content and the SDK will alert the user if they need to update Messenger.

Version 4.4.0

Modified

  • The SDK now targets v2.4 of the Graph API. Please review the Graph API changelog for details. For example, the number of default fields returned by Graph endpoints have been reduced and you should always explicitly ask for the fields you need.
  • Removed unused GroupID property from Facebook.ShareKit.AppGroupContent class.

Fixed

  • Fixed bug when tagging people or places in open graph stories when using Share Dialogs.
  • Fixed bug in ShareDialog that did not validate content before sharing.

Version 4.3.0

Added

  • Added GraphNode property to ShareAPI class.

Fixed

  • Fixed crash when sharing content (like photos) via the Share Dialog in the callback of the LoginManager class.
  • Fixed stack overflows when rendering LoginButton in iPad popovers
  • Fixed NSKeyedUnarchiver console error when using like controls.
  • Fixed bug in RefreshCurrentAccessToken to prevent bad logic when CurrentAccessToken == null.
  • Fixed consoler error when using ProfilePictureView with an initial size dimension of 0.

MessengerShareKit

Fixed

  • Fixed bug that truncated metadata containing ampersands or semicolons.

Version 4.2.0

  • New sample added

Modified

  • TestUsersManager class now correctly pages through test user account results.
  • GameRequestContent.To, GameRequestContent.Suggestions to avoid non public selector validation warnings
  • Removed ShareAPI.CreateObjectsWithClientToken
  • Improves Facebook Analytics for Apps reporting
  • Improved OAuth Login flow security

Fixed

  • Fixed module map for TestUsersManager class
  • Fixed landscape orientation for web view dialogs on iOS 7
  • Fix bug that incorrectly tried to apply error recovery to client token requests
  • Fixed bug preventing usage of fb:explicitly_shared for open graph actions.

FBSDKMessengerShareKit

Fixed

  • Fail at compile time when trying to use Messenger SDK in an extension

Version 4.1.0

Added

  • Added AccessToken.RefreshCurrentAccessToken method to refresh current token.
  • Added TestUsersManager class to simplify writing tests with test users.
  • Added property Caption to SharePhoto class.
  • Added property Message to ShareAPI class.

Modified

  • ShareAPI will now warn about missing "publish_actions" in the console rather than throwing an exception immediately.
  • The SDK will throw an exception if the FacebookAppID or URL schemes are missing.
  • Removed AppInviteContent (NSUrl) constructor. Use the standard constructor and set the AppLinkURL property.

Fixed

  • Fixed bug that prevented invoking login from app delegate lifecycle events.
  • Fixed bug that prevented usage of fb:explicitly_shared for open graph actions.
  • Fixed bug in system account store login that would not re-prompt for missing permissions.
  • Fixed bug in handling NSURLs and NSNumbers in parameters in sharing APIs.
  • Fixed bug that prevented GraphRequestConnection's delegate from receiving the RequestConnectionDidFinishLoading message.
  • Fixed bug that could result in premature dellocation of dialogs before completion.

Facebook.MessengerShareKit

  • Fixed Messenger buttons to have clear background color.

Version 4.0.1.3

  • Fixed some interfaces on some classes
  • Fixed some methods that were bound as properties
  • Changed name of ShareAPI.From method to ShareAPI.Share

Version 4.0.1.2

  • Fixed ios-unified tag

Version 4.0.1.1

This is a major release:

  • The main namespace changed, used to be MonoTouch.FacebookConnect, now is just Facebook.
  • Now it contains 4 namespaces:
    • Facebook.CoreKit
    • Facebook.LoginKit
    • Facebook.ShareKit
    • Facebook.MessengerShareKit
  • FB prefix on classes removed.
  • iOS 6 is no longer supported. The Facebook iOS SDK v4.X requires iOS 7 or higher.

Added

  • Facebook.Corekit namespace: provide common SDK classes, and APIs for App Events, Graph API Requests:
    • Profile class * a robust way to fetch user public profile data.
    • GraphErrorRecoveryProcessor class * an error recovery attempter to process Facebook errors.
    • Utility class* a utility class to help parse URLs.
  • Facebook.LoginKit namespace: provide login functionality:
    • LoginManager class * a block based API for authorization.
  • Facebook.ShareKit namespace: * provide sharing functionality.
    • GameRequestDialog class * a strongly typed dialog to create Game Requests.
    • AppInviteDialog class * a strongly typed dialog to send App Invites.
    • ShareAPI class * a strongly typed implementation to perform shares over the Graph API.
    • ShareButton/SendButton/LikeButton classes * turn-key buttons for sharing.
  • Facebook.MessengerSharerKit namespace: * Classes for building on Messenger Platform

Modified

  • Existing classes have been renamed with no prefix instead of FB. For example, FBAppEvents -> AppEvents.
  • FBAppCall is generally replaced by ApplicationDelegate class.
  • FBRequest is replaced by GraphRequest and automatically provides error recovery and simpler error classification.
  • FBSession and FBAccessTokenData are replaced by LoginManager and AccessToken.

Removed

  • FBGraphObject. Use the appropriate open graph content model along with ShareAPI class from Facebook.ShareKit namespace.
  • FBViewController and FBCacheDescriptor. No alternative. Construct a table view and page the Graph API results manually.
  • FBSDKTokenCachingStrategy. No alternative. LoginManager class caches tokens to keychain automatically. You can observe token changes to do manual post processing.

Version 3.23.0

Added

  • Added ForUploadVideo method on FBRequest class to more easily upload videos.
  • Added a "remove shared" button on samples

Modified

  • FBErrorUtility better categorizes server-side errors when System Account login fails.
  • FBRequest parameters now support NSNumber instances.

Fixed

  • Fixed FBViewController to page results correctly.
  • Fixed FBViewController does not display its own navigation bar when in a modal navigation controller.
  • Fixed bug in FBRequestConnection that prevented video uploads if token refresh requests were piggybacked.
  • Fixed bug regarding cookie usage in FBRequest.
  • Fixed analyzer warnings.
  • Added NSCopying protocol to FBAccessTokenData class
  • Added FBWebDialogsDelegate protocol to FBFrictionlessRecipientCache class
  • Added GetProvisionedForPost() and SetProvisionedForPost() methods to FBGraphObjectProtocol
  • Added NSObject as BaseType of FBGraphObjectProtocol
  • Changed FBGraphObject class BaseType from NSObject type to NSMutableDictionary type

Version 3.22.0

Added

  • Added CodeForError method and SubcodeForError method on FBErrorUtility class to more easily work with Facebook errors.
  • Added FBTestUsersManager and FBTestUserSession to more easily write integration tests (replaces FBTestSession).
  • Allow opted-in apps to automatically log in-app purchase events as App Events. See the App Events guide.

Modified

  • Deprecated FBTestSession class.

Fixed

  • Fixed bug in FBSession that prevented restoring from cache when the cached token had different permissions.
  • Fixed bug in FBRequestConnection that did not respect setting of `ErrorBehavior'.
  • Fixed bug in FBSessionTokenCachingStrategy that prevented using different instances to cache different tokens.
  • Fixed crash caused by decoding of incorrectly formatted URLs.

Version 3.20.0.2

  • Removed Audience Network from component

Version 3.20.0.1

  • Unified API support (Xamarin.iOS 8.6)

Version 3.20.0

Facebook iOS SDK

Modified

  • v3.20 of the SDK targets v2.2 of the Graph API.
  • Updated Bolts submodule to 1.1.3 and ios-snapshot-test-case to 1.2.
  • FBLikeControl now has a objectType property to specify the object type to like and can log errors to console when using the new FBLoggingBehaviorUIControlErrors logging behavior.

Fixed

  • Updated podspec to no longer include AdSupport framework or FBUserSettingsViewResources.bundle by default.
  • Fixed bugs in Like Button.
  • Fixed bug in login when using FBSessionLoginBehaviorUseSystemAccountIfPresent.
  • Fixed memory leak in FBLoginView.
  • Fixed bug in FBRequestConnection so that piggybacked requests (such as token extension) are not added when using deprecated style FBRequests, or if the graph version part had been overridden.
  • Minor documentation and whitespace fixes.

FBAudienceNetwork

Fixed

-Fixed interstitial ad layout after screen rotation.


Version 3.19.0.3

  • Added FBAudienceNetwork framework to the component

Version 3.19.0.2

  • A minor fix on Enums

Version 3.19.0.1

Fixed

  • FBSettings Class: Fixed typo on enablePlatformCompatibility

Version 3.19

Added

  • Added Facebook-iOS-SDK.podspec for better Cocoapods support.
  • The Like Button for iOS is now out of beta!
  • Added Unified Api support

Fixed

  • Fixed thread safety bug in FBDynamicFrameworkLoader.
  • Fixed memory leaks reported by analyzer.
  • Fixed bug in FBViewController that did not display Cancel or Done buttons in some iOS 8 conditions.
Write a Review

59 reviews

Narcis Strinu rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Login with publish permissions isn't working anymore on iOS >=11. LogInWithPublishPermissions will only open a blank view and nothing happens.

Posted on: December 29, 2017 / Version: 4.27.1.0
Nikolay Anisimov

Hi, do you have any plans to upgrade Xamarin SDK to the latest 4.27.1 version? They have some important bug fixes for IOS 11 there.

Posted on: October 20, 2017 / Version: 4.26.0.0
danjuma mallum rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I couldn't get this to work on a real device. On the simulator, things seem to work fine. However, whenever I deploy to the physical device the app terminates on launch with no error message. It actually says "the app successfully launched on device", but the app crashes on launch.

Posted on: June 15, 2017 / Version: 4.19.0.0
adik servitola

I have a problem like: file is universal (3 slices) but does not contain a(n) armv7s slice

I've removed armv7s support from app, but now app dont work on iphone 7. Any suggestions?

Posted on: February 23, 2017 / Version: 4.16.1.0
Leonardo Soares Lima rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

It's work perfectly with me, but when I use an application with version below 9.0, I receive this message calling the method "LogManager.LogInWithReadPermissions".

NSInvalidArgumentException Reason: setObjectForKey: object cannot be nil (key: logging_token)

Posted on: November 9, 2016 / Version: 4.16.1.0
Mohammad Zekrallah rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

This is crashing in debug mode with "Don't Link" linker settings in iOS 8 only .. iOS 9 and 10 are working .. what could be the reason ?

Posted on: October 9, 2016 / Version: 4.15.1.0
Phongpol Punyagupta rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Stopped working recently

Posted on: October 8, 2016 / Version: 4.15.1.0
Sergey Chereshnyuk

Hi, There are a lot of wrappers and extensions in code of component. Why did you provide the link to native facebook-ios-sdk repository? Where is source code of binding project? or is it not open source code?

Posted on: September 25, 2016 / Version: 4.13.1.0
Dmitry Adodin rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Don't work on iOS 10. need to update native lib

Posted on: September 20, 2016 / Version: 4.13.1.0
Georgi Georgiev

Hi,

the included "HelloFacebook" sample will not open the native login UI no matter what "LoginBehavior" is set to. It only opens the Web UI.

Could someone please update it so it works?

Regards.

Posted on: July 14, 2016 / Version: 4.12.0.0
joseph rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

can someone PLEASE post a working copy to github. Source code listed above is just bonkers, i would have expected more from Xamarin that this substandard documentation.

Posted on: June 26, 2016 / Version: 4.12.0.0
Halil Dogan Bolak rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

As soon as I click on the LoginButton the app crashes with the following error:

Xamarin.iOS: Received unhandled ObjectiveC exception: NSInvalidArgumentException -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x79e25080

Posted on: May 19, 2016 / Version: 4.10.0.0
Carlos Merchán rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Hi!!

Are you going to update this sdk with the new AccountKit? I'm very interesting about it. Thanks

Posted on: April 27, 2016 / Version: 4.10.0.0
Pedro Silva rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Hi, i implemented the Share funcionality on my app and everything works fine:

I can create a dialog with an url, image, title and description. But when i publish it returns to my app as normal but posts nothing on the facebook. I have those 4 lines on info.plist since im using the 4.10 version and added the fb(versionId) to info.plist URL types Any sugestion? Thank you

Posted on: March 29, 2016 / Version: 4.10.0.0
Santiago Cabrera rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Hi, I'm trying to use ShareDialog with Mode = Native and it doesn't work at all. The only way I've found is to write my own ShareDialog so I can get to the protected constructor and the populate the mode. But when I try to show the dialog on the device It always fails with a shareContent Invalid, whatever the content or mode or anything. It just appears that extending from ShareDialog just don't work. Is there any solution to this? Is someone reading this reviews?

Posted on: February 12, 2016 / Version: 4.9.1.0
Matt Harrington rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Devs should know that iOS 9 apps using this component default to using a Safari View Controller, as explained here: https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9.

Posted on: January 28, 2016 / Version: 4.9.1.0
François Mouchati rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Updated from 4.5.1 to 4.8.0 and got a SIGABRT due to an exception not caught on checkregisteredcanopenurlscheme in FBSDKInternalUtility.m:647.

It took me a while to understand the crash was coming from that update (not caught by Xamarin Insight btw). Then I followed the instruction re iOS 9, the info.plist and the SDK version older than 4.6. Unfortunately the crash remained with same error. I had to revert to 4.5.1.

Posted on: December 5, 2015 / Version: 4.8.0
arby safarian rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

It works perfectly fine for me. Make sure to update info.plist file with you own Facebook app name and identifier and then in Source tab under info.plist change value of URL types->URL Schemes to fb[Yout_FB_APP_ID] and it should work fine.

Posted on: November 8, 2015 / Version: 4.5.1
Israel Soto

The 4.5.1 version is not working well with iOS 9.0. To make work correctly, you will need to use the v4.6 or later. We have the 4.7.0 "beta" version that works correctly with iOS 9.0, available only through NuGet for now:

https://www.nuget.org/packages/Xamarin.Facebook.iOS/4.7.0-beta1

If you are not very acquainted with Xamarin Studio and NuGet, here's a walkthrough of how to add a NuGet into your app:

https://developer.xamarin.com/guides/cross-platform/application_fundamentals/nuget_walkthrough/

Posted on: October 31, 2015 / Version: 4.5.1
Aurelio Benitez

how do you login using Facebook app instead to web

Posted on: October 15, 2015 / Version: 4.5.1
Chris Bertsch rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Would have expected much better documentation and examples. This seems very sloppy.

Posted on: October 12, 2015 / Version: 4.5.1
joaquin grech rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Serious bugs:

1) It's on the Facebook namespace instead of Xamarin.Facebook which conflicts with all your other facebook stuff. (The android version is on Xamarin.Facebook, not sure why the iOS didn't follow the proper pattern). 2) Since ios9 it gets a IsCancelled on every try to login. Even after following https://developers.facebook.com/docs/ios/ios9 instructions it won't log in. 3) It's not updated to the latest fb sdk.

Posted on: October 7, 2015 / Version: 4.5.1
Soo-hong Suh rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

For those who can't get native login working on iOS9, make sure you make necessary changes to your info.plist as described in https://developers.facebook.com/docs/ios/ios9.

Posted on: September 29, 2015 / Version: 4.5.1
Kevin Cherdchaithamrong rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Absolutely frustrating in terms of finding examples and documentation on this. Clicking on Source just takes me to Facebook's API, but their code isn't 100% based off of it, or not all developers know how to read XCode/Swift. If only Xamarin could provide examples of how sharing works, how liking works, that would really help new developers.

I'm not sure why the ShareDialog constructor is protected? Could you please update it so it's public?

Posted on: August 29, 2015 / Version: 4.5.1
Joaquin Grech rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

why, oh why, is it on Facebook namespace? it messes up all other Facebook sdk, even the official ones.

It's ironic because the Android version is correctly into Xamarin.Facebook but this iOS version is on Facebook... which makes it a nightmare to integrate. Could you guys please change the namespace to Xamarin.Facebook ? it would be so much easier for everyone and reuse the code between android and iOS so much better

Posted on: August 22, 2015 / Version: 4.5.1
Jacob Duijzer rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

While this component works like a charm, somebody should be ashamed about the provided code example. If I'm correct I spotted at least 4 errors in these few lines!

Posted on: August 14, 2015 / Version: 4.4.0
SRIKANTH DEVARAJAN rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I wish Xamarin provides clean samples and guides to the developers,, the code mentioned above is just buggy to start with ," LoginButton loginView is declared" but it is initialized as LoginButton. (Are we missing something here?)

Being one of the oldest customer of Xamarin, the best part I like about Xamarin is/was? its simplicity, but off late this platform is getting complex and constant changes to the code base is making it worse. At least I wish the team producing sample code opts to follow basic coding practice/ standards. The sample code provided for this component is so ugly that it will fail with "flying colors" even on a basic code review.

Posted on: August 5, 2015 / Version: 4.4.0
Julian rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

The package is missing the library

Posted on: July 6, 2015 / Version: 4.2.0
Fahad Basri

Where's the library???!!

Posted on: June 20, 2015 / Version: 4.2.0
Daniel Barrros Amorim rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

When I use ShareLinkContent it works great on debug mode, but when I run it on release, it returns to the DidCancel method showing a wrong alert message. It should return to DidComplete method instead.

Posted on: June 11, 2015 / Version: 4.1.0
CORSIN Simon

Starting 4.0.1.1, the zip has no library attached. Also, I can't find "Facebook iOS SDK" on Xamarin Components when searching within Xamarin Studio. I could find it only through http://components.xamarin.com

Posted on: May 13, 2015 / Version: 4.1.0
Dave Barnes

Trying to install the component, it's complaining that it needs Xamarin.Facebook. But this is a Xamarin iOS project, and that seems to be a Xamarin.Android component!

Posted on: May 7, 2015 / Version: 4.0.1.3
Sergio Ribeiro rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I love this component. But, after the last Xamarin Studio update the Facebook Component Elements suddenly started to appear aligned to the right. Are you facing the same issue? Do you know how to center align them again?

Posted on: April 30, 2015 / Version: 4.0.1.3
Nikola Irinchev rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Awesome component and amazing response time for issues.

Posted on: April 30, 2015 / Version: 4.0.1.1
nita

No library attached to the latest sdk , It has only samples and componenents.

Can you verify it?

Posted on: April 16, 2015 / Version: 4.0.1.1
pranart dechpokket rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I have solve problem of mr 'Sergey Zaytsev' by making myapp 64bit.

problem: 'I cannot publish my app because of non-public API usage inside this component:' application, birthday, city, comments, from, id, latitude, longitude, street, tags, zip.

solution: making app to be 64 bit.

Posted on: April 7, 2015 / Version: 3.23.0
pooja jalan

Its not working.I am getting IFBGraphUser null.i have also tried your sample code .give me solution asap.

Posted on: March 17, 2015 / Version: 3.23.0
randall tomes rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

This no longer works. On ipad air with 7.1 the login attempts to open in safari but suddenly crashes. Just changing extended permissions seems to get you one loggin but after that is won't work. Oddly, it works on simulator. This important feature not working is a major deal breaker for xamarin. I have no option but to drop xamarin and look into swift. Objective C wasn't even this aggravating as this constantly breaking xamarin.

---OLD REVIEW BELOW WHEN IT WORKED----

I don't know about the other reviews but maybe that was a previous version. This just put an end to days of looking for facebook login solution for my xamarin projects. I first tried the other Facebook sdk component, stampsy, xamarin.auth, xamarin.social. This is the only one that actually works for these requirements.

Use the new ios6 & later native system fb login rather than webview login. The user does this once for your app and not every time you close and open it.

As a backup, use webview login only if native fb login doesn't exists on phone. (So it works for simulator also).

Intuitive api not only for using login but posting as well. The sample works first time. I tested this first on a real phone logged into fb then on simulator without fb.

To get started all I did was:

Set your app id here: private const string AppId = "YOUR_APP_ID";

Made two changes to info.plist. Make bundle identifier is the same as you registered with your facebook apps account. In Advanced tab/ URL Types there is URL Schema that starts with fb454..... , replace the numeric part with your fb app id. "fbYOUR_APP_ID"

Make sure you fb app is set to single sign on.

Posted on: January 20, 2015 / Version: 3.14.1
Manuel Costa

Just ported a project to handle 64 bits and updated this component to Version 3.22

Now when we try to access a FBGraphUser we get the following error

Wrapper type 'MonoTouch.FacebookConnect.FBGraphUser' is missing its native ObjectiveC class 'FBGraphUser'.

Posted on: January 16, 2015 / Version: 3.22.0
Ali Akram rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Does anyone having issue in fetching friend list in latest SDK? all works fine for me but friend list is not being displayed in case of android. I am new to Xamarin please guide.Many Thanks

Posted on: December 24, 2014 / Version: 3.20.0
Justin Duff

Hi guys, i have just linked this component in my project, but I have noticed that the build time has not doubled. Is there a way to speed it up? I am loading it in the simulator and in debug but it's taking over a minute to build now.

Posted on: December 18, 2014 / Version: 3.20.0
Grigory Perepechko rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Asks for Xamarin.IOS library. What is it ?

Does it mean monotouch ?

Posted on: November 24, 2014 / Version: 3.20.0
Derek Winnicki rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

The native Facebook iOS SDK has had a setter for the FBFriendPickerViewController selection property since 3.10, but it's still missing from this binding. I need this setter to pre-select friends when displaying the picker.

Posted on: November 17, 2014 / Version: 3.15.1
Corey Perkins

Don't bother using with Xamarin Forms. I tried to inject the FBLoginView inside of a parent UIViewController using the PageRenderer injection. You have to hammer DismissViewController repeatedly to close the view, it usually takes two or three times. Also, don't bother with Xamarin.Auth #1 Facebook won't approve it because it uses a custom web view and #2 It won't work on iOS because you'll get a SECURITY WARNING from Facebook that you cannot redirect away from. All in all, I think the Xamarin team has ignored auth and left it half baked.

Posted on: October 15, 2014 / Version: 3.19.0
Abtin Rostamian rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

The FetchedUserInfo event is getting fired twice without reason in 3.19. This was apparently happening in an older version of the native SDK as well. Are you guys aware of this and is there a fix?

Posted on: October 6, 2014 / Version: 3.18.0
Sjoerd van Noort rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I had a perfectly working version of the older component. But because facebook is going to force graph api 2.0 minimum I had to upgrade. Now native integration does not work anymore. When logging in I get the webview login. I cannot ship my update with this version. Very frustrated.

Posted on: September 30, 2014 / Version: 3.18.0
Will Stones rates this with
  • 1
  • 2
  • 3
  • 4
  • 5
  • Edited review - Dispite being 30MB in size the linker will strip unused code therefore it will not increase the size of the executable by 30MB. Very happy with this component so far, not using much functionality but for my use - basic sign in and friend retrieval it is perfect.
Posted on: September 27, 2014 / Version: 3.18.0
Dimitar Dobrev rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I get a crash:

MonoTouch.RuntimeException: The registrar found a signature mismatch in the method 'MyCustomFacebookSession.DidExtendToken' - the selector 'fbDidExtendToken:expiresAt' indicates the method takes 1 parameters, while the managed method has 2 parameters.

I override DidExtendToken. When I remove the override, it works. The wrapper of DidExtendToken looks like:

[Export("fbDidExtendToken:expiresAt"), CompilerGenerated] public virtual void DidExtendToken(string accessToken, NSDate expiresAt) { throw new You_Should_Not_Call_base_In_This_Method(); }

I am not well familiar with wrapping Objective-C but having one parameter instead of two does not look correct to me. Please also take a look at the rest, for example DidNotLogin seems to be missing a parameter as well.

I've filed a bug at https://bugzilla.xamarin.com/show_bug.cgi?id=23224 .

Posted on: September 21, 2014 / Version: 3.18.0
Aro Wierzbowski rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

This release is broken! Every time i try log in with my account singed in iPhone I am redirected to Safari! This is unacceptable behavior! Please fix this ASAP!

Posted on: September 16, 2014 / Version: 3.18.0
Jan Dryk rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

The login dialog is always webview, not the integrated iOS one nor the facebook app one. Also id like fbrequestresults to return a managed object not a NSObject that i have to cast several times.

Posted on: September 12, 2014 / Version: 3.18.0
Luke Larsen rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Had some issues, but works good now!

Posted on: September 1, 2014 / Version: 3.17.1
Renato Todorov rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Hey guys, we really need this component updated to the 3.17 version, so we can be aligned to the Graph API v2.1. Thanks in advance.

Posted on: August 26, 2014 / Version: 3.16.1
Bill Manousos rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

With Facebook integration it is important that all aspects of integration work.

I have tried to use this numerous times and it seems that each version has its own bugs.

This version crashes when using FBRequestConnection.UploadStagingResource(UIImage)

as seen with the below exception. Unfortunately there is no documentation or support for this component besides being redirected to the native API documentation on Facebook. Also there doesn't seem to be much help on the Xamarin forums.

I do beleive that the people that made this component are trying to do the right thing, however having a component that partially works causes developers more problems then solutions as we struggle to get it to work so they are better not seeing the light of day.

System.InvalidCastException: Cannot cast from source type to destination type. at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr) at MonoTouch.ObjCRuntime.Runtime.ConstructNSObjectFBRequest [0x00000] in :0 at MonoTouch.ObjCRuntime.Runtime.GetNSObjectFBRequest [0x00000] in :0 at MonoTouch.FacebookConnect.FBRequestConnection.UploadStagingResource (MonoTouch.UIKit.UIImage image, MonoTouch.FacebookConnect.FBRequestHandler handler) [0x00000] in :0 at MonoTouch.FacebookConnect.FBRequestConnection.UploadStagingResourceAsync (MonoTouch.UIKit.UIImage image) [0x00000] in :0 at ChoosePlease.DataSource+d__1d.MoveNext () [0x0007a]

Posted on: August 1, 2014 / Version: 3.16.1
Kevin Varga rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Great but needs update too new version.

Posted on: July 23, 2014 / Version: 3.15.1
koby rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Thanks for this great component!!!! needs an update to v3.16.1.

Posted on: July 22, 2014 / Version: 3.15.1
Sergey Zaytsev rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I cannot publish my app because of non-public API usage inside this component:

application, birthday, city, comments, from, id, latitude, longitude, street, tags, zip.

Posted on: April 11, 2014 / Version: 3.11.1
Ales Golli

Tony, did you configure the Facebook App properly? App > Settings > Basic > Add Platform > iOS...

Posted on: April 11, 2014 / Version: 3.11.0
Tony Fonager rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

I cannot make it work, using native iOS Facebook login - it prompts me and ask for permission to use it, but then nothing happens when I click “Yes”.

If I look under “Settings” and “Privacy”, my app is not listed as using native iOS Facebook login, so I suspect that being the problem.

What could be wrong ?

Posted on: April 11, 2014 / Version: 3.9.0
Edward Kisinger rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Current Version has a bug that prevents use:

http://forums.xamarin.com/discussion/comment/35103#Comment_35103

Bug has been filed: https://bugzilla.xamarin.com/show_bug.cgi?id=16349

I look foward to a fix; I really want to use this component over the others. Hopefully they will get a fix in soon. I will adjust rating once fixed.

Posted on: April 11, 2014 / Version: 3.9.0