どこから行くのですか?これは、sdkで提供されている例のコピー貼り付けとほぼ同じです。私は人々がこのAPIで何かを構築する方法を理解していないのですか?ログインなどのためのプロンプト画面を開くにはどうしたらいいですか? Facebookはこれについて何か言いますか?Facebook APIヘルプ
<?php
require 'fb_sdk/src/facebook.php';
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
'appId' => 'APIID',
'secret' => 'SECRET',
));
// Get User ID
$user = $facebook->getUser();
// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is logged into
// Facebook, but we don't know if the access token is valid. An access
// token is invalid if the user logged out of Facebook.
if ($user) {
try {
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
// Permissions requested from the user.
$par = array();
$par['scope'] = 'user_about_me, read_friendlists';
// Login or logout url will be needed depending on current user state.
if ($user) {
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl($par);
}
?>
G ood答えは、@ Jollygoodのように:それのためにAPIを考えないでください。あなたのアプリを手伝ってくれることがあります。あなたのアプリが提供するものを明確にしたら、Facebook APIとの統合点は明確になります。この[サンプル](http://developers.facebook.com/docs/samples/canvas/)アプリを例に取ると、あなたのアプリのアイデアを実感し、Facebookからユーザーのフルネーム、メール、写真、友人が必要であると結論づけますそれに応じてAPIを使用してください。 – ifaour