My team and I have been crawling both the net and Facebook Docs for answers, but for some reason there are no valid answers to our question.
So we desperately hope for help from someone here
We are trying to create a video AD on facebook. Upload is done and we are at the step where we need to create the creative through /adcreatives endpoint.
Below is the body of the POST :
https://graph.facebook.com/v2.8/act_[account_id]/adcreatives
{
"access_token": "token_that_is_valid",
"object_story_spec": {
"page_id": "valid_numeric_page_id",
"video_data":{
"image_url": "link_to_img",
"video_id": "valid_numeric_video_id",
"call_to_action" :{
"type": "LEARN_MORE",
"value":{
"link": "my_link",
"link_caption":"my_link_caption",
"link_description": "description"
}
}
}
},
"name":"jjkkllkjljl"
}
The response from facebook is rather worrying :
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1487390,
"is_transient": false,
"error_user_title": "Adcreative Create Failed",
"error_user_msg": "The Adcreative Create Failed for the following reason: Oops, something went wrong. Please try again later",
"fbtrace_id": "EVL6GYOOtYi"
}
}
Also as an extra info, creating both non-video / image creatives and herafter ads is not an issue. Posting pre uploaded videos to a page is NOT an issue. All access rights has been given to the Facebook APP.
Thank you for taking the time to look at this.
I've the same problem with Python.
To fix it you shouldn't use video_id from admin panel.screenshot from admin panel
You should upload video and get video_id from API.
Example Python code:
video = AdVideo(parent_id=ad_account_id)
video[AdVideo.Field.filepath] = 'test.mp4'
video.remote_create()
video_id_for_creative=video.get_id()
link description is not a valid parameter in the call_to_action value: https://developers.facebook.com/docs/marketing-api/reference/ad-creative-link-data-call-to-action-value/
Related
I am trying to build a Slack app by using AWS lambda and NodeJs. The issue I am facing is that I don't understand in what format does the SlackBot need the JSON payload from my AWS lambda code to display it.
I followed the tutorial video suggested on Slack linked here. In the video, the following JSON object is created and returned from the AWS lambda.
const response = {
statusCode: 200,
body: "Sample Response",
};
The SlackBot posts the text entered in the 'body' property (i.e. 'Sample Response' in this case) as a response. This seems to be working well. But, I need some more flair than simple text so I looked into their Block Kit UI builder. But there seems to be no documentation for how to do this with a similar 'response' JSON object like this. How exactly am I supposed to use the JSON object created by the UI builder?
I do not know much about Web development so sorry if this seems like a very basic question. I wish there was a sample Slack app on their website which showed this.
The following may work for you (I use a similar one on the production);
{
"channel": "your-channel-name",
"username": "channel-username",
"attachments": [
{
"title": "some-title",
"fallback": "some message",
"text": "some text",
"fields": [
{
"title": "sub-title",
"value": "sub-title-value",
"short": true
},
{
"title": "some-other-title",
"value": "some-value"
}
],
"color": "red"
}
],
"icon_emoji": "gun"
}
This link or this one may provide some extra information.
i'm using the Foursquare API in a project in order to manage venues informations through my app. Everything works fine, until I try to POST data to edit a venue details.
Actually, the post request seems to work fine, since a I get a 200 status code response. However I never see my changes on the platform. Here's the response I get :
{
"meta": {
"code": 200,
"requestId": "5d0a1b210d2be70039f03fc4"
},
"notifications": [
{
"type": "notificationTray",
"item": {
"unreadCount": 0
}
}
],
"response": {
"woes": []
}
}
Did any one succesfully used Foursquare API to edit venue details and then saw the changes on the platform ?
Thanks for your help !
I am using the Graph API to get details from business users. Since most of the Profile is Non-Business, would like to find-out, if there is an API to get the Profile Type?
During the trial, I keep getting the following message and also discovered sometime the API is misbehaving..
{
"error": {
"message": "Invalid user id",
"type": "OAuthException",
"code": 110,
"error_subcode": 2207013,
"is_transient": false,
"error_user_title": "Cannot find User",
"error_user_msg": "The user with username: rohit_xxx cannot be found.",
"fbtrace_id": "FkKgUvBdJWZ"
}
}
So, If I know the Profile Type in advance, We can handle the response in much better way..
Thanks in Advance..
The instagram Graph API is designed to work with creator/business accounts. This is specified in multiple places.
If a user doesn't have business/creator account, the instagram id would be empty in the response.
curl -i -X GET \
"https://graph.facebook.com/v3.2/{fb-page-id}?fields=instagram_business_account&access_token={access-token}"
Response:
{
"instagram_business_account": {
"id": "" // Connected IG User ID
},
"id": "134895793791914" // Facebook Page ID
}
Steps Followed:
I created a speech services instance in West US.
I have the right headers(Content-Type and Ocp-Apim-Subscription-Key)
I make a POST request to https://westus.cris.ai/api/speechtotext/v2.0/transcriptions/ with below request payload
{
"recordingsUrl": "https://transcribehm97c1.blob.core.windows.net/audio-files/2019-04-04_Blockchain%20explained%20with%20TruStory%27s%20Preethi%20Kasireddy.mp3?st=2019-05-27T12%3A19%3A27Z&se=2019-12-31T12%3A19%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=HFBvGl1pmCM95MNU9U3yniMNXrUMT6RmPb36F32cxrY%3D",
"models": [],
"locale": "en-US",
"name": "I dont know why this is not working",
"description": "Someone please send help",
"properties": {
"ProfanityFilterMode": "Masked",
"PunctuationMode": "DictatedAndAutomatic"
}
}
I get a “202 Accepted” response with below headers. This confirms that the request body is valid.
location: https://westus.cris.ai/api/speechtotext/v2.0/transcriptions/69b7abf4-6383-4490-88a9-9fd42a77e470
When I make a GET Request to the above location, I see this
{
"recordingsUrl": "https://transcribehm97c1.blob.core.windows.net/audio-files/2019-04-04_Blockchain explained with TruStory's Preethi Kasireddy.mp3?st=2019-05-27T12:19:27Z&se=2019-12-31T12:19:00Z&sp=rl&sv=2018-03-28&sr=b&sig=HFBvGl1pmCM95MNU9U3yniMNXrUMT6RmPb36F32cxrY%3D",
"resultsUrls": {},
"models": [“I have removed this for brevity”],
"statusMessage": "The recordings URI is invalid.",
"id": "69b7abf4-6383-4490-88a9-9fd42a77e470",
"createdDateTime": "2019-05-27T12:43:39Z",
"lastActionDateTime": "2019-05-27T12:43:50Z",
"status": "Failed",
"locale": "en-US",
"name": "I dont know why this is not working",
"description": "Someone please send help",
"properties": {
"ProfanityFilterMode": "Masked",
"PunctuationMode": "DictatedAndAutomatic"
}
}
The transcriptions fails for some URL's while passing for others for blobs in the same storage although they are all valid URL’s. The SAS URI in the request is valid till end of the
year.
I have re-tried the same request multiple times via code and Postman and it fails.
Link to Swagger Page : https://westus.cris.ai/swagger/ui/index
The issue may be due to the audio file size. Please refer the core features for REST API as the REST support only short Audio.
I have a page on Facebook and app to do some actions on it.
I can get reviews of my page using this API:
GET 2044933538893604/ratings
And I can get comments of some review.
GET 2009974472404526/comments
I have problem when I try to add comment to that review post.
POST 2009974472404526/comments
{
"message" : "some message"
}
I am getting following error:
{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": `2069006`,
"is_transient": false,
"error_user_title": "User Cannot See This App",
"error_user_msg": "The user who owns object 2,009,974,472,404,526 cannot see this app.",
"fbtrace_id": "CIrr69/JFp/"
}
}
I have a token that has all permissions enabled.
I see someone had the same problem here Got a Facebook error as "Code 200, subcode 2069006" while replying reviews by a page access token at my Facebook page and looks like he had found a solution but for some reason it is not posted there.