万歳........ 、
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>My Feed Dialog Page</title>
<g:javascript src="jquery1.7.1.js" />
</head>
<body>
<div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p id='msg'></p>
<script type="text/javascript">
$().ready(
FB.init({appId: "you appId", status: true, cookie: true})
);
FB.login(function(response) {
if (response.authResponse) {
var access_token = FB.getAuthResponse()['accessToken'];
console.log('Access Token = '+ access_token);
FB.api('me/photos', 'post', {
message: 'has shared Picture http://www.scrappur.com/',
status: 'success',
access_token: access_token,
url: 'http://www.maargasystems.com/images/gallery/thumbs/1.jpg'
}, function (response) {
if (!response || response.error) {
alert('Error occured:' + response);
} else {
alert('Post ID: ' + response.id);
}
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
}, {scope: 'user_photos,photo_upload,publish_stream,offline_access'});
</script>
</body>
</html>
の
可能重複[FacebookのグラフAPI - 写真JavaScriptを使用してアップロード](http://facebook.stackoverflow.com/questions/ 4999024/facebook-graph-api-upload-photo-using-javascript) –