How can I like a Fanpage with the Facebook Graph API - actionscript-3

it is possible to lika a FanPage with the actionscript3 Facebook Api or the Graph API?
I used follow methode:
Facebook.api(Page_ID + "/likes/", getLikeHandler, URLRequestMethod.POST);
But I get follow Exception
{
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3
}
}
Do you have an solution for my problem?

This is currently not possible via any of the public Facebook APIs. You can only publish 'likes' for Open Graph objects.

Related

How to Add File Reference to Quality Issue

Via the BIM360 API, I am able to create Quality Issues and upload files (to be used as attachments). However, even though I am calling Post Attachments (https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-attachments-POST/) (and all responses are good), nothing appears on the Issue screen.
Issue screen with manually added file. How can I make my attached file appear under the References->Files section?
(Note, I saw a mention elsewhere of the relationships API, but I get a random error just calling the first "asset" API [{"title":"Forbidden","detail":"Forbidden","errorCode":"GENERAL_ERROR","type":"https://developer.api.autodesk.com/bim360/assets/v1/error-codes/GENERAL_ERROR"}])
firstly, the screenshot shows you are working with Issues in Autodesk Construction Cloud (ACC), while the API you are using is for BIM360 Issue. This API is NOT compatible with ACC.
To work with ACC Issue, the API is available at the category of ACC:
https://forge.autodesk.com/en/docs/acc/v1/reference/http/issues-issues-GET/
this blog tells more.
https://forge.autodesk.com/blog/acc-issues-api-available-preview
In the context of ACC, the attachment(references) is managed by the general API (Relationship API). In Additional Tests of Postman collection of ACC Issue API, I demoed how to add Photo with the Issue. The logic is similar.
https://github.com/Autodesk-Forge/forge-acc.issues.api-postman.collection
Firstly, use Data Management API to get the document urn. Then, use ACC Issue API to get id of one issue. finally, use Relationship API to bind them.
PUT https://developer.api.autodesk.com/bim360/relationship/v2/containers/{{project_id_without_b}}/relationships
P.s. -bim360- in the domains is just because of legacy design of the terminologies. It can work for the contexts of both BIM360 and ACC (note it is Relationship API can work within both of the contexts)
Payload:
[
{
"entities": [
{
"domain": "autodesk-bim360-issue",
"type": "issue",
"id": "{{one_issue_id}}"
},
{
"domain": "autodesk-bim360-documentmanagement",
"type": "documentlineage",
"id": "{{one_document_urn}}"
}
]
}
]

android-publisher verification testing

Hi I am currently working on an app with an in-app-shop. Now I need to implemented Server Side Verification for Google In-app-purchases. We use https://github.com/googleapis/google-api-php-client for the verification. We already got the in app purchases and have tested the in app purchases with the test products (android.test.purchased). Is there a way to test the validation ? In the moment i get the following response when using a "android.test.purchased" for the following call
$googleApiResult = $service->purchases_products->get($_ENV['PACKAGENAME'], $productId, $token);
{
"error": {
"code": 400,
"message": "Invalid Value",
"errors": [
{
"message": "Invalid Value",
"domain": "global",
"reason": "invalid"
}
]
}
}
In the docs it states that you need the productive data. The app has already an Alpha Track. On the alpha track in the Google Store the in app purchases are also approved but cannot get verified by the backend. Since the alpha track is a productive enviroment, we do not have the console or network logs to check whats the problem. What is the best practice here. Is there a way to debug verification ?
In my case the problem is insufficent permission of my Google Client. I used the tokens which we got from the productive enviroment and used them in the local api.

How do I access the inner data in this Google Custom Search errors array?

I have a web app using Google Custom Search via REST. So far, everything works fine, but when I exceed the allotted daily quota of queries, I want to give the user some info about it. I get this JSON response, and I can access the "code" and "message" data using response.error.code and response.error.message, but I don´t know how to access the subset "errors", specifically "reason".
I know this is a JSON question, but I don´t have much experience with it.
This is the JSON structure I receive (which is what I expect)
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceeded",
"message": "This API requires billing to be enabled on the project. Visit https://console.developers.google.com/billing?project=323544036192 to enable billing.",
"extendedHelp": "https://console.developers.google.com/billing?project=323544036192"
}
],
"code": 403,
"message": "This API requires billing to be enabled on the project. Visit https://console.developers.google.com/billing?project=323544036192 to enable billing."
}
}
I found the solution trying different things. I think I got lucky.
console.log(response.error.errors[0].reason);
This gives me the data I was trying to access.

How to get specific items in Microsoft Graph´s JSON response

Hello I am using Microsoft Graph with OneNote and when I make the following request : https://graph.microsoft.com/v1.0/me/onenote/pages?$select=title,links
I get this response:
I don´t need the "oneNoteClientUrl" attribute, so How can I get only the "oneNoteWebUrl" attribute.
And when I use: pages? search=item&select=title,links.
I get this issue.
{
"error": {
"code": "10002",
"message": "The service is currently unavailable. Please try again later.",
"innerError": {
"request-id": "13535682-a12b-4127-935b-6601154c1416",
"date": "2017-05-31T21:38:04"
}
}
}
I read that "search is available for consumer notebooks only"
How can I get pages with specific words in their content and title?
Unfortunately, the API doesn't yet support searching pages in SharePoint - only in OneDrive consumer. This is something in our radar, but we don't yet have any ETA on this.
I encourage you to create/upvote a uservoice entry for this.
https://onenote.uservoice.com/forums/245490-onenote-developer-apis

forbidden call to /tokens api

I'm trying the new "private beta" feature "Tokens" (http://developers.box.com/docs/#tokens) of box 2.0 using an API key, which I think has private beta access.
But I get the following response:
{
"type":"error",
"status":403,
"code":"forbidden",
"help_url":"http:\/\/developers.box.com\/docs\/#errors",
"message":"Forbidden",
"request_id":"10957639134febfbf1f1477"
}
Look like my obtained API key doesn't have access to the "Tokens" api. Is there any way to verify it? What do you guys think?
Per the note in the documentation, you'll need to contact us at apiATboxDOTcom in order to have this enabled.