Line | |
---|
1 | <?
|
---|
2 | require_once 'facebook.php';
|
---|
3 |
|
---|
4 | $appapikey = 'YOURAPIKEY';
|
---|
5 | $appsecret = 'YOURSECRETKEY';
|
---|
6 | $facebook = new Facebook($appapikey, $appsecret);
|
---|
7 | $user = $facebook->require_login();
|
---|
8 |
|
---|
9 | //[todo: change the following url to your callback url]
|
---|
10 | $appcallbackurl = 'CALLBACKURL';
|
---|
11 |
|
---|
12 | //can't catch exception with php4, so just check if user has added the application
|
---|
13 | if (!$facebook->api_client->users_isAppAdded()) {
|
---|
14 | $facebook->redirect($facebook->get_add_url());
|
---|
15 | }
|
---|
16 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.