- Using ShareKit
- Using Facebook SDK
1. I create FBShare class implementing UIViewController class and UIWebViewDelegate class.
2. Declare method, property and action in header file.
3. In this step I create an url request for get the access token to access the Facebook graph api. Facebook Graph Api will generate the key with expire time and send back to your web view. First of all you must create a new application in Facebook using Facebook Developer site. You can extend the permission like using status_update, photo_upload, share_item. According to your permission Facebook Graph Api generate separate access token.
This is the UI of my application and you can install the application for allow to build a connection between your application and Facebook Graph Api.
4. In this step I get the response url which send by Facebook Graph Api. That's why I implement the UIWebViewDelegate class into my FBShare class.
5. Using regular expression, take the access token and its expire time.
6. Finally you can publish your image in your wall. You can add any string value for boundary.