{"id":31939272,"url":"https://github.com/bluechilli/chillisource.mobile.facebook","last_synced_at":"2026-04-11T01:51:01.952Z","repository":{"id":85004874,"uuid":"89904299","full_name":"BlueChilli/ChilliSource.Mobile.Facebook","owner":"BlueChilli","description":"Facebook identity plugin for ChilliSource Mobile","archived":false,"fork":false,"pushed_at":"2018-05-08T07:05:33.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-01T07:59:56.532Z","etag":null,"topics":["android","csharp","dotnet","ios","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueChilli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-01T06:59:32.000Z","updated_at":"2018-05-04T01:53:07.000Z","dependencies_parsed_at":"2023-03-01T03:45:20.230Z","dependency_job_id":null,"html_url":"https://github.com/BlueChilli/ChilliSource.Mobile.Facebook","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BlueChilli/ChilliSource.Mobile.Facebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueChilli%2FChilliSource.Mobile.Facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueChilli%2FChilliSource.Mobile.Facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueChilli%2FChilliSource.Mobile.Facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueChilli%2FChilliSource.Mobile.Facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueChilli","download_url":"https://codeload.github.com/BlueChilli/ChilliSource.Mobile.Facebook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueChilli%2FChilliSource.Mobile.Facebook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018312,"owners_count":26086342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","csharp","dotnet","ios","xamarin","xamarin-forms"],"created_at":"2025-10-14T08:24:49.651Z","updated_at":"2025-10-14T08:24:50.914Z","avatar_url":"https://github.com/BlueChilli.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![Built With C#](https://img.shields.io/badge/Built_with-C%23-green.svg)\n\n# ChilliSource.Mobile.Facebook #\n\nThis project is part of the ChilliSource framework developed by [BlueChilli](https://github.com/BlueChilli).\n\n## Summary ##\n\n```ChilliSource.Mobile.Facebook``` provides simplified access to Facebook's identity and media sharing features. \n\n## Usage ##\n\n### Identity ###\n\nTo use Facebook's login and identity functionality, first initialize the ```ChilliSource.Mobile.Facebook.IIdentityService``` dependency service:\n```csharp\nvar identityService = DependencyService.Get\u003cIIdentityService\u003e();\n```\n\nYou must also add the following code to your ```AppDelegate.cs``` for iOS:\n```csharp\npublic override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)\n{\n    // We need to handle URLs by passing them to their own OpenUrl in order to make the SSO authentication work.\n    return ApplicationDelegate.SharedInstance.OpenUrl(application, url, sourceApplication, annotation);\n}\n```\n\n**Logging In**\n\n```csharp\nvar permissions = { \"public_profile\", \"email\" };\nvar fields = { \"id\", \"name\", \"email\", \"gender\", \"age_range\", \"first_name\", \"last_name\", \n    \"is_verified\", \"verified\", \"picture\" };\n\nvar result = await identityService.Login(fields, permissions);\nif (result.IsSuccessful)\n{\n    var token = result.Result.Token;\n    Console.WriteLine(\"Facebook token:  \" + token);\n}\n```\n\nThis will present the standard Facebook login page and return back to the application once the user has logged in.\n\n**Logging Out**\n```csharp\nidentityService.Logout();\n```\n\n**Retrieving User Info**\n\n```csharp\nvar userInfoResult = await Global.Instance.FacebookIdentityProvider.GetUserInfo(token, fields);\nif (userInfoResult.IsSuccessful)\n{\n    JObject data = userInfoResult.Result.Data;\n    var name = data[\"name\"].ToString();\n    var facebookId = data[\"id\"].ToString();\n}\n```\n\n### Sharing ###\n\nTo use Facebook's media sharing functionality, first initialize the ```ChilliSource.Mobile.Facebook.ISharingService``` dependency service:\n```csharp\nvar sharingService = DependencyService.Get\u003cISharingService\u003e();\n```\n\nInvoking any of the sharing methods below will present a Facebook popup prompting the user to share the specified link/video/images.\n\n**Sharing a Link**\n\n```csharp\nvar result = sharingService.ShareLink(linkUrl, hashtags);\n```\n\n**Sharing Images**\n\nYou can share multiple images at the same time by passing in a List of string paths.\n\n```csharp\nvar result = sharingService.ShareImageFiles(imagePaths, hashtags);\n```\n\nNote that the image paths have to point to assets in the media library. Use the ```ChilliSource.Mobile.Media.IMediaService``` dependency service to retrieve the media library url for an asset.\n\n**Sharing a Video**\n\n```csharp\nvar result = sharingService.ShareVideoFile(videoPath, hashtags);\n```\n\nNote that the video path has to point to an asset in the media library. Use the ```ChilliSource.Mobile.Media.IMediaService``` dependency service to retrieve the media library url for an asset.\n\n### Analytics ###\n\nTo use Facebook's ```AppEvents``` to log analytics data, first initialize the ```ChilliSource.Mobile.Facebook.IAppEventsService``` dependency service:\n```csharp\nvar appEventsService = DependencyService.Get\u003cIAppEventsService\u003e();\n```\n\nThen add the following code in your ```AppDelegate.cs``` for iOS:\n```csharp\npublic override bool FinishedLaunching(UIApplication app, NSDictionary options)\n{\n    ...\n\n    if (options == null || options[UIApplication.LaunchOptionsUrlKey] == null)\n    {\n        var result = await appEventsService.FetchDeferredAppLink();\n        if (result.IsSuccessful)\n        {\n            UIApplication.SharedApplication.OpenUrl(NSUrl.FromString(result.Result));\n        }\n    }\n    ...\n}\n```\n\n```csharp\npublic override void OnActivated(UIApplication uiApplication)\n{\n    appEventsService?.ActivateApp();\n}\n```\n\nTo log custom events simply call:\n```csharp\nappEventsService.LogEvent(eventTitle);\n```\n\n## Installation ##\n\nThe library is available via NuGet [here](https://www.nuget.org/packages/ChilliSource.Mobile.Api).\n\n## Releases ##\n\nSee the [releases](https://github.com/BlueChilli/ChilliSource.Mobile.Facebook/releases).\n\n## Contribution ##\n\nPlease see the [Contribution Guide](.github/CONTRIBUTING.md).\n\n## License ##\n\nChilliSource.Mobile is licensed under the [MIT license](LICENSE).\n\n## Feedback and Contact ##\n\nFor questions or feedback, please contact [chillisource@bluechilli.com](mailto:chillisource@bluechilli.com).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluechilli%2Fchillisource.mobile.facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluechilli%2Fchillisource.mobile.facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluechilli%2Fchillisource.mobile.facebook/lists"}