Skip to content

Instantly share code, notes, and snippets.

View ConnectAppDelegate.m
#import "MyViewController.h"
#import "HelloWorldAppDelegate.h"
#import "FBConnect/FBConnect.h"
static NSString* kApiKey = @"YOUR_API_KEY";
static NSString* kApiSecret = @"YOUR_API_SECRET";
@implementation HelloWorldAppDelegate
@synthesize window;
View ConnectAppDelegate.h
#import <UIKit/UIKit.h>
@class MyViewController;
@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate, FBSessionDelegate> {
UIWindow *window;
MyViewController *myViewController;
FBSession* _session;
View ConnectViewController.m
#import "MyViewController.h"
@implementation MyViewController
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
}
View ConnectViewController.h
#import <UIKit/UIKit.h>
#import "FBConnect/FBConnect.h"
@interface MyViewController : UIViewController {
IBOutlet FBLoginButton* _loginButton;
}
@end
View CanvasIframeGsWithFql.html
<div id="fb-root"></div>
<script src="http://static.ak.fbcdn.net/connect/en_US/core.js"></script>
<div id="content">
<div align="right"><fb:login-button autologoutlink="true" v="2"></fb:login-button>
</div>
<h1>Recipes For You on Facebook</h1>
<h3>Peanut Butter and Jelly Sandwich &nbsp; &nbsp; <button onClick="triedIt();">I Tried This!</button></h3>
2 slices bread<br>
1 T peanut butter<br>
View CanvasIframeGsWithJs.html
<div id="fb-root"></div>
<script src="http://static.ak.fbcdn.net/connect/en_US/core.js"></script>
<div id="content">
<div align="right"><fb:login-button autologoutlink="true" v="2"></fb:login-button><br>
<button onClick="triedIt();">I Tried This!</button>
</div>
<h1>Recipes For You on Facebook</h1>
<h3>Peanut Butter and Jelly Sandwich</h3>
View CanvasIframeGsWithWidgets.html
<div id="fb-root"></div>
<script src="http://static.ak.fbcdn.net/connect/en_US/core.js"></script>
<div id="content">
<div align="right"><fb:login-button autologoutlink="true" v="2"></fb:login-button></div>
<h1>Recipes For You on Facebook</h1>
<h3>Peanut Butter and Jelly Sandwich</h3>
2 slices bread<br>
1 T peanut butter<br>
1 T jelly<br>
View CanvasIframeGs.html
<div id="content">
<h1>Recipes For You on Facebook</h1>
<h3>Peanut Butter and Jelly Sandwich</h3>
2 slices bread<br>
1 T peanut butter<br>
1 T jelly<br>
&nbsp;<br>
Using knife, spread peanut butter on one slice of bread. Using a clean knife,
spread jelly on the other slice. Put slices together so that the peanut butter
and jelly meet. If desired, cut into squares or triangles.
View ConnectGsWithFql.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Peanut Butter and Jelly Sandwich</title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
}
View ConnectGsWithJavascript.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Peanut Butter and Jelly Sandwich</title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
}
You can’t perform that action at this time.