{"id":1499,"url":"https://github.com/floriangbh/FacebookImagePicker","last_synced_at":"2025-08-06T13:32:28.191Z","repository":{"id":45871135,"uuid":"69742189","full_name":"floriangbh/FacebookImagePicker","owner":"floriangbh","description":"FacebookImagePicker is Facebook album photo picker written in Swift.","archived":true,"fork":false,"pushed_at":"2021-11-30T23:23:08.000Z","size":15939,"stargazers_count":236,"open_issues_count":1,"forks_count":61,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-22T13:22:36.105Z","etag":null,"topics":["facebook","facebook-api","facebook-graph-api","facebook-login","facebook-sdk","facebookimagepicker-ios","fbsdk","image-picker","picker","swift"],"latest_commit_sha":null,"homepage":"http://floriangabach.fr","language":"Swift","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/floriangbh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-01T14:08:25.000Z","updated_at":"2024-01-06T12:12:37.000Z","dependencies_parsed_at":"2022-09-05T05:20:44.796Z","dependency_job_id":null,"html_url":"https://github.com/floriangbh/FacebookImagePicker","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floriangbh%2FFacebookImagePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floriangbh%2FFacebookImagePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floriangbh%2FFacebookImagePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floriangbh%2FFacebookImagePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floriangbh","download_url":"https://codeload.github.com/floriangbh/FacebookImagePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905489,"owners_count":17989775,"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","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":["facebook","facebook-api","facebook-graph-api","facebook-login","facebook-sdk","facebookimagepicker-ios","fbsdk","image-picker","picker","swift"],"created_at":"2024-01-05T20:15:47.893Z","updated_at":"2024-12-09T14:30:55.076Z","avatar_url":"https://github.com/floriangbh.png","language":"Swift","funding_links":[],"categories":["Media","Libs","Swift","Images [🔝](#readme)"],"sub_categories":["Image","Images","Other free courses"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/terflogag/FacebookImagePicker/blob/master/Ressources/welcome_img.png\" alt=\"FacebookImagePicker\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://cocoapods.org/pods/GBHFacebookImagePicker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/GBHFacebookImagePicker.svg?style=flat\" alt=\"Cocoapods version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"http://cocoapods.org/pods/GBHFacebookImagePicker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/l/GBHFacebookImagePicker.svg?style=flat\" alt=\"Cocoapods licence\" /\u003e\u003c/a\u003e\n    \u003ca href=\"http://cocoapods.org/pods/GBHFacebookImagePicker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/GBHFacebookImagePicker.svg?style=flat\" alt=\"Cocoapods plateform\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"Prs welcome\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\n  • \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n  • \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n  • \u003ca href=\"#translation\"\u003eTranslation\u003c/a\u003e\n  • \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\nGBHFacebookImagePicker is ***Facebook's*** album photo picker written in Swift, built to provide a simple way to pick picture into Facebook account. The picker provides a simple interface like the native iOS photo picker. \nThis picker takes care of all authentication (from the web or with the native Facebook app) when necessary. If the photo's permission isn't accepted during the login, the picker prompts another permission's request.\n\n## Screenshot / Demo\n\n![Preview](https://github.com/terflogag/FacebookImagePicker/blob/master/Ressources/preview.png)\n\n## Features \n\n- [x] Login with Facebook SDK and display user's Albums or tagged photos\n- [x] Display pictures of each albums \n- [x] Handling denied Facebook photo's permission \n- [x] Multiple selection in one album\n- [x] Select all \n\n## Example\n\nIn your terminal :\n\n```ruby\npod try GBHFacebookImagePicker\n```\n\nOr to run the example project manually, clone the repo, and run `pod install` from the Example directory first.\n\nDon't forget to replace the current Facebook App's ID with your own in the plist file (Open as \u003e Source code). \nLike this :\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eCFBundleTypeRole\u003c/key\u003e\n        \u003cstring\u003eEditor\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n            \u003carray\u003e\n                \u003cstring\u003efb\u003cYOUR_FACEBOOK_APP_ID\u003e\u003c/string\u003e\n            \u003c/array\u003e\n    \u003c/dict\u003e\n\u003c/array\u003e\n\u003ckey\u003eFacebookAppID\u003c/key\u003e\n\u003cstring\u003e\u003cYOUR_FACEBOOK_APP_ID\u003e\u003c/string\u003e\n```\n\nJust in case, for public application (which can be use in the AppStore), you need to send your Facebook's App in review to have user's photos permission.  \n\n## Usage\n\n- You need to set up your application correctly to work with Facebook : https://developers.facebook.com/docs/ios/getting-started and https://developers.facebook.com/docs/ios/ios9\n\n- Import the library : \n\n```swift\nimport GBHFacebookImagePicker\n```\n\n- Then, implement the `GBHFacebookImagePickerDelegate` protocol :\n\n```swift\n// MARK: - GBHFacebookImagePicker Protocol\n\nfunc facebookImagePicker(imagePicker: UIViewController,\n                         successImageModels: [GBHFacebookImage],\n                         errorImageModels: [GBHFacebookImage],\n                         errors: [Error?]) {\n    // Append selected image(s)\n    // Do what you want with selected image \n    self.imageModels.append(contentsOf: successImageModels)\n}\n\nfunc facebookImagePicker(imagePicker: UIViewController, didFailWithError error: Error?) {\n    print(\"Cancelled Facebook Album picker with error\")\n    print(error.debugDescription)\n}\n\n// Optional\nfunc facebookImagePicker(didCancelled imagePicker: UIViewController) {\n    print(\"Cancelled Facebook Album picker\")\n}\n\n// Optional\nfunc facebookImagePickerDismissed() {\n    print(\"Picker dismissed\")\n}\n```\n\nThe imageModel contain : \n\n```swift\npublic class FacebookImage {\n    public var image: UIImage? // The image, not nil only if image is selected\n    public var normalSizeUrl: String? // Normal size picture url\n    public var fullSizeUrl: String? // Full size source picture url\n    public var imageId: String? // Picture id\n}\n```\n\n- Display picker : \n\n```swift\nlet picker = FacebookImagePicker() \npicker.presentFacebookAlbumImagePicker(from: self, delegate: self) \n```\n\n## Customisation\n\nYou can apply some customisation. To do it you can use the [FacebookPickerConfig structure](CUSTOMISATION.md). \n\n## Aditionals informations \n\n- About tagged photos : the tagged photos are displayed in an album (hide by default, see customisation section to display it) with the name \"Photos of You\". You can change this default name in the settings. The tagged album's cover is the facebook account profile picture, which are retrieved with a special call to the graph API. \n\n## Translation \n\nFacebookImagePicker is currently written in english. If you need translation for the permission popup (or whatever thing), just add this line in your localized file  :\n\n```\n\"Pictures\" = \"\u003cyour_translation\u003e\";\n\"Oups\" = \"\u003cyour_translation\u003e\";\n\"You need to allow photo's permission.\" =  \"\u003cyour_translation\u003e\";\n\"Allow\" = \"\u003cyour_translation\u003e\";\n\"Close\" = \"\u003cyour_translation\u003e\";\n\"Album(s)\" = \"\u003cyour_translation\u003e\";\n\"Photos of You\" = \"\u003cyour_translation\u003e\";\n\"\"No picture(s) in this album.\" = \"\u003cyour_translation\u003e\";\"\n```\n\n## Requirements\n\n* Xcode 11.4\n* iOS 9.0+ target deployment\n* FBSDKCoreKit, FBSDKLoginKit (\u003e= 7.0 for the v5.0)\n* Facebook Application, see [usage](#usage) for explaination \n* Swift 3, 4, 4.2 or 5.1 project\n\n## Installation\n\nFacebookImagePicker is available through [CocoaPods](http://cocoapods.org). \nTo install it, simply add the following line to your Podfile:\n\n```ruby\npod \"GBHFacebookImagePicker\"\n\npod \"GBHFacebookImagePicker\", '~\u003e 2.4' # For swift 4.0\n\npod \"GBHFacebookImagePicker\", '~\u003e 1.3.1' # For Swift 3.1\n```\n\n## Communication\n\n- If you **need help**, open an issue.\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request and **read** the [contributing file](CONTRIBUTING.md).\n\n## Author\n\nFlorian Gabach, florian.gabach@gmail.com\n\n## License\n\nFacebookImagePicker is available under the [MIT license](LICENSE).\n\nIf your application use this picker consider to add the licence in your Credits/About section. You can use [this library to do it](https://github.com/terflogag/OpenSourceController).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloriangbh%2FFacebookImagePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloriangbh%2FFacebookImagePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloriangbh%2FFacebookImagePicker/lists"}