我正在使用facebook javascript sdk和图形api.my代码正常工作,单个image.how将多值参数传递给图像。
$("#ac").click(function()
{
FB.init({
appId : 'validappid',
status : true, // check login status
cookie : true,
xfbml : true // parse XFBML
});
FB.login(function(response) {
if (response.authResponse) {
var access_token = FB.getAuthResponse()['accessToken'];
console.log('Access Token = '+ access_token);
FB.api('me/posimplicity:eat',
'post',
{
restaurant: "http://samples.ogp.me/440002909390231",
image:'http://abc.in/images/items/120px-Chana_masala.jpg',
},
function(response) {console.log(response);
// handle the response
}
);
}
},{scope: 'read_stream,publish_stream,offline_access,user_photos'});
})
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
http://jsfiddle.net/BJK2b/33/ 我想展示订购的所有菜肴图片