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.
Related
I am trying to create a user using azure graph API. For this, I have got the token response as below:
Once I have the token, I have added this as bearer token in Authorization for the below url:
https://graph.microsoft.com/v1.0/users
and posting the below json data:
{
"accountEnabled": true,
"displayName": "Andrew",
"mailNickname": "SanAndrew",
"userPrincipalName": "andrew.san204#gmail.com",
"passwordProfile" : {
"forceChangePasswordNextSignIn": true,
"password": "password"
}
}
But getting below error:
{
" error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"request-id": "c06079d2-ff6b-4e5b-b34d-704f16bc312f",
"date": "2019-06-03T11:20:20"
}
}
}
although I have all the permissions as shown below:
Can anyone please suggest what I am doing wrong here.
One possibility for the error is that you are trying to create a user with gmail.com domain. The domain needs to be one of the verified domains in your AAD tenant.
If you want to add a gmail.com user anyway, you need to send an invitation through the invitations endpoint: https://learn.microsoft.com/en-us/graph/api/invitation-post?view=graph-rest-1.0&tabs=cs
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
}
I want to fetch the analytics of any channel of youtube that basically are not owned by me. I am using this API.
If this is not the right API please suggest me how to achieve this.
Also, I am using node.
https://youtubeanalytics.googleapis.com/v2/reports?dimensions=day&endDate=2019-01-01&ids=channel%3D%3DUCZSNzBgFub_WWil6TOTYwAg&metrics=likes&startDate=2018-01-01
Response:
{
"error": {
"code": 403,
"message": "Forbidden",
"errors": [
{
"message": "Forbidden",
"domain": "global",
"reason": "forbidden"
}
]
}
}
You need to understand the difference between private and public data. Public data is data that can be accessed by anyone. Public videos on YouTube for example
Private data is data that is owned by a user. A good example of that would be the analytics for a channel on Youtube. You cant access this kind of information without the permission of the user who owns it.
{
"error": {
"code": 403,
"message": "Forbidden",
"errors": [
{
"message": "Forbidden",
"domain": "global",
"reason": "forbidden"
}
]
}
}
Means that the currently authenticated user doesn't have permission to do what you are trying to do. You need to login with a user who has access to this data. I suggest you ask the owner of the channel to give you access.
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/
I'm trying to create a subscription to receive notification about changes to Office365 Calendar. I have already worked with Outlook Notitication API but having a problem with Microsoft Grap API
I try to create a subscription using Http Post to https://graph.microsoft.com/beta/subscriptions with header and body:
Header: Content-Type: application/json; Authorization : Bearer {accessToke}
Body:
{
"resource": "me/calendars",
"notificationUrl": "sample notification url",
"changeType": "Created",
}
In my notification url, i've setup to send a response with the value of validation token when receveving a validation request
Finally, the result i received:
{
"error": {
"code": "ExtensionError",
"message": "There was an error processing a storage extension.",
"innerError": {
"request-id": "6c563931-511d-415d-9c04-c07f25d45b1f",
"date": "2016-03-20T08:10:32"
}
}
}
I wonder what I'm doing wrong or that's a internal error of MS Grap API. Can anyone help me? Thank in advance
The correct resource to use for calendar events is "me/events". We'll try to get a better error message in future.