壁のポストに画像を投稿しようとしたところ、次のコードで数ヶ月間うまく機能していました。突然それは動作を停止しました。FB.uiで画像が機能しない
httpsでテストすると動作しませんが、httpで動作します。
プロトコルがhttpsの場合、APP URLはhttpsを使用し、そうでない場合はhttpを使用しています。
$protocol = "http";
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']!="off")
$protocol = "https";
define("CANVAS_URL","$protocol://apps.facebook.com/appname/");
define("APP_URL","$protocol://domain.com/content/appname/live/");
FB.ui(
{
method: 'feed',
name: 'my app name',
link: <? echo "'".CANVAS_URL."'";?>,
picture: <? echo "'".APP_URL."'";?>+image,
caption: _caption,
description: _description
}, function(response) {
if (response && response.post_id)
{
// published
} else {
// not published
}
}
);
私は画像のURLを指定してみました: ます。http: とも同様の相対を//url/to/image/image.png:それらの 画像/ image.png どれも、それは薄い灰色を示します。httpsの下で働いていません画像は表示されません。 Firebugでイメージを読み込む要求が表示されません。 –
Strange - HTTPSではなくHTTPでページ自体を読み込んでいるときと全く同じフィードリクエストが機能しますか? –
私はここにバグがあると思いますが、これはhttps://www.nytimes.comのFB.ui({'method': 'feed'、 'picture': 'http: /i1.nyt.com/images/2011/09/18/nyregion/18ADOPT1_SPAN/18ADOPT1_SPAN-hpMedium.jpg '、' link ':' https://shadowytree.com/stsite/ '}) ' –