background preloader

Facebook Programming

Facebook Twitter

How to post on Facebook wall through an iOS app. The last two steps are just coding.

How to post on Facebook wall through an iOS app

There is some good stuff to read as well (and you should do so) if you want to get more familiar with what we're going to do here. The Facebook documentation is pretty good to let you understand about the login mechanism (the Single Sign On - SSO) and how application work on Facebook generally, as well as some articles all around the Internet. But as I already said, it's hard to find something to guide you from the beginning until the end. Let's get started. and go directly to the delegate .m file.

@implementation AppDelegate @synthesize window = _window; @synthesize viewController = _viewController; -(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; @end. Iphone - iOS facebook check if friends have app installed. Developer Apps. Authentication - DĂ©veloppeurs Facebook. iOS Tutorial. The SDK comes with samples that demonstrate some of its features.

iOS Tutorial

To find and run these samples, download the SDK, and then click on the .pkg file and follow the wizard to install it. Once the SDK is installed, go to the FacebookSDK folder (located by default inside your Documents folder), and there you will find a Samples folder that contains the samples you're looking for. You can run them from Xcode in the iPhone simulator. FriendPickerSample Demonstrates how to use a FBFriendPickerViewController in the Facebook SDK for iOS.

GraphApiSample Demonstrates the basics of how to make a (single or batch) request using the Facebook SDK for iOS. HelloFacebookSample Demonstrates some basic usage of the Facebook SDK, including: PlacePickerSample Demonstrates how to use the FBPlacePickerViewController provided with the Facebook SDK for iOS. ProfilePictureSample Demonstrates how to use the Profile picture control provided with the Facebook SDK for iOS. RPSSample. Iphone - Facebook iOS SDK - Sending a facebook user an app request. Test Users. You can delete a test user by making a delete operation on this node.

Test Users

DELETE /v2.1/{test-user-id} HTTP/1.1Host: graph.facebook.com /* PHP SDK v4.0.0 *//* make the API call */ $request = new FacebookRequest( $session, 'DELETE', '/{test-user-id}'); $response = $request->execute(); $graphObject = $response->getGraphObject();/* handle the result */ /* make the API call */new Request( session, "/{test-user-id}", null, HttpMethod.DELETE, new Request.Callback() { public void onCompleted(Response response) { /* handle the result */ } }).executeAsync(); Permissions An app access token for an associated app or the test user's own access token must be used to delete that test user. Fields No fields are required to delete. Response If successful: Otherwise a relevant error message will be returned. Authenticating as an App. Facebook's official SDKs manage the lifetime of tokens for you.

Authenticating as an App

When using iOS, Android or our JavaScript SDK, the SDK will handle making sure that tokens are refreshed before they expire. Native mobile applications using Facebook's SDKs will get long-lived access tokens, good for about 60 days. These tokens will be refreshed once per day when the person using your app makes a request to Facebook's servers. If no requests are made, the token will expire after about 60 days and the person will have to go through the login flow again to get a new token. Access tokens on the web often have a lifetime of about two hours, but will automatically be refreshed when required. Here are the steps that you need to take to generate a long-lived token: Start with a short-lived token generated on a client and ship it back to your server.Use the user token, your app ID and app secret to make the following call from your server to Facebook's servers: GET /oauth/access_token?

Refreshing Long-Lived Tokens ...