var match = this.FBUniqID; alert(match);
When I run the above code in deployd console, it gives an error
{ "message": "alert is not defined", "status": 400 }
How can I generate an alert message in deployd?
Related
I am able to make localPost using GMB api.
However, when I add media, it gives me an error.
The error is as following.
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"errors": [
{
"message": "Request contains an invalid argument.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
My source code is as following.
Also, I installed google/apiclient from github and GMB library from here
$mediaItem = new \Google_Service_MyBusiness_MediaItem();
$mediaItem->setSourceUrl("https://example.com/test");
$mediaItem->setMediaFormat('PHOTO');
$media[] = $mediaItem;
$post = new \Google_Service_MyBusiness_LocalPost();
$post->setSummary($summary);
$post->setCallToAction($callToAction);
$post->setMedia($media);
$obj = new \Google_Service_MyBusiness($client);
$obj->accounts_locations_localPosts->create($accountLocation,$post);
If I comment out
"$post->setMedia($media);", I can make localPost.
Do you have a suggestion for this?
Best regards,
I solved myself.
Before:
$mediaItem->setSourceUrl("https://example.com/test");
After:
$mediaItem->setSourceUrl("https://example.com/test.jpg");
The reason why I could not make localPost is that the image extension should be image extension.
Google API dose not allow us to post the image that has not extension.
Cheers.
Anyone can help me?.
I want register subscription for user, i use ngrok.
I try use postman it success but in my web it error.
this is my log
[2020-07-20 11:12:52] local.INFO: Error: Client error: `POST https://graph.microsoft.com/v1.0/subscriptions` resulted in a `400 Bad Request` response:
{
"error": {
"code": "InvalidRequest",
"message": "Subscription validation request timed out.",
"inner (truncated...)
this is my validationToken i receive:
array (
'validationToken' => 'Validation: Testing client application reachability for subscription Request-Id: d11e795b-9b06-46ff-b2ba-0df49a6e1c5c',
)
and my code
try {
$graph = new Graph();
$graph->setAccessToken($this->token);
$sub = new Model\Subscription();
$sub->setChangeType("created");
$sub->setNotificationUrl($this->domain. '/api/receive-notification');
$sub->setResource( "users/" . $outlook_id . "/events");
$sub->setClientState('SecretClientState');
$dateTime = new Carbon();
$dateTime->addDays(3);
$sub->setExpirationDateTime($dateTime);
$subResult = $graph->createRequest("POST", "/subscriptions")
->attachBody($sub)
->setReturnType(Model\Subscription::class)
->execute();
dd($subResult);
} catch (\Exception $e) {
dd($e->getMessage());
}
Graph API only allows 4230 minutes into the future.
Change
$dateTime->addDays(3);
to
$dateTime->modify('+4230 minutes');
I am trying to access message using graph API with the following URL.
_graphAPIEndpoint = Uri.EscapeUriString("https://graph.microsoft.com/v1.0/me/messages/8577e5c2-3d1b-4882-b930-02de5ad18809#CH1GMEHUB07.gme.gbl");
However, I keep getting the following response:
{
"error": {
"code": "ErrorInvalidIdMalformed",
"message": "Id is malformed.",
"innerError": {
"request-id": "8b2d8f88-ff5b-44f7-bb71-8867a03136b7",
"date": "2018-06-07T18:00:32"
}
}
}
Any suggestions on what's wrong?
My bad. Message ID value should be taken from id field passed by Graph API. To use message ID, following query works:
_graphAPIEndpoint = "https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq ''"
I get the following error for iOS when I tried to send push notification via MFP console
{
"code": "FPWSE0009E",
"message": "Internal server error. No devices found.",
"productVersion": "8.0.0.00-20170220-1900"
}
The device is active . The is the result from the "Devices" API
{
"productVersion": "8.0.0.00-20170220-1900",
"totalListSize": 4,
"items": [
{
"id": "0AC11F77-A89A-4616-9085-4F6009329F3",
"lastAccessed": "2017-07-12T16:13:56.985Z",
"status": "ACTIVE",
"deviceOs": "ios 10.2.1",
"deviceModel": "iPhone",
"applicationDeviceAssociations": [
{
"appName": "RandstadJobsiOS",
"appId": "com.randstadusa.randstadjobs$ios$2.0.1",
"certSerialNumber": "",
"deviceId": "0AC11F77-A89A-4616-9085-4F6009329F3",
"status": "ENABLED",
"deviceStatus": "ACTIVE"
}
]
},
..
Push is working for android.
The iOS push certification is valid and will expire in 2018. I used the same cert in prod and receive push notification
Additionally,I tried to debug in Xcode and it does the following
MFPPush.isPushSupported -- return true
MFPPush.initialize - return success
However, it does not execute the MFPPush.registerDevice in the code
** Update
#Vivin
When the the Subscription API is executed I get the result
{
"code": "FPWSE0001E",
"message": "Not Found - The target resource 'PushDevice' does not exist. Check the '0AC11F77-A89A-4616-9085-4F6009329F3' parameter.",
"productVersion": "8.0.0.00-20170220-1900"
}
Please let me know how to debug this issue
I am using trigger URL to run a test case created on Runscope. In response I am getting only details as shown in Runscope documentation. For eg.
Response Sample data:
{
"data": [],
"error": null,
"meta": {"status": "success"}
}
But I need the data in response body retrieved from server for request made.For eg.
{
"Status": "OK",
"Body": [{"userId": 12345,"sessionId": "abcd:1234"}]
}
I am using HttpRequest and HttpResponse for the same.
Why don't you use something like this :
https://www.npmjs.com/package/dyson#installation
It is used to mock results via api .