Publish a photo to your Facebook Page, or stage one
facebook.facebook.page.photo.createPublish a photo to your Facebook Page, or stage one for a multi-photo post
- Price
- freeプロバイダー原価
- Success rate
- 100%Last 30 days · 425 calls
- Latency p50
- 2.3 sp95 5.5 s
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/facebook.facebook.page.photo.createPreviewTry online近日公開Provider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
needs pages_manage_posts and the Page token (select this Page on the connection). For a multi-photo post: call this once per photo with published=false, collect the ids, then call facebook.page.post.create with attached_media=[{"media_fbid": "<id>"}, …]. Meta caps a feed post at 10 attached photos
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| パスパラメータ | ||||
page_id | 文字列 | 必須 | numeric id of the Page selected on the connection | 123456789012345 |
- パスパラメータ
page_id文字列必須numeric id of the Page selected on the connection
例:
123456789012345
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
Preview
curl -X POST 'https://toolswitch.dev/v1/tools/facebook.facebook.page.photo.create' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/facebook.facebook.page.photo.create",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/facebook.facebook.page.photo.create", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。