はい、Javaスクリプトを使用して使用できます。
<textarea id="status" cols="50" rows="5">ここにステータスを記入し、[レガシー API 呼び出しを使用して設定されたステータス] をクリックしてください</textarea>
<br />
<a href="#" onClick="setStatus(); return false;">JSDK 呼び出しを使用したステータス セット</a>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: 'あなたの APPI ID', status: true, cookie: true, xfbml: true});
/* 登録されたすべてのイベント */
FB.Event.subscribe('auth.login', function(response) {
// レスポンスで何かをする
//ログインする();
});
FB.Event.subscribe('auth.logout', function(response) {
// レスポンスで何かをする
//ログアウト();
});
FB.getLoginStatus(関数(応答) {
if (response.session) {
// ログインして接続したユーザー、あなたの知っている人
// ログインする();
}
});
};
(関数() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
関数 setStatus(){
status1 = document.getElementById('status').value;
FB.api(
{
メソッド: 'status.set',
ステータス: ステータス1
}、
関数 (応答) {
もし (応答 == 0){
alert('Facebook のステータスが更新されていません。ステータスの更新許可を与えてください。');
}
そうしないと{
alert('あなたの Facebook ステータスが更新されました');
}
}
);
}
</script>