I have been using below request to receive data from facebook api:
143357502355510/feed?fields=insights{name,title}&since=1474732800&until=1477324800&limit=100
but after version 2.6 has been deprecated and I changed sdk version to 2.7 this error is receiving:
"error": {
"message": "Invalid query",
"type": "OAuthException",
"code": 3001,
"error_subcode": 1504028,
"is_transient": false,
"error_user_title": "No Metric Specified",
"error_user_msg": "No metric was specified to be fetched. Please specify one or more metrics to be fetched and try again.",
"fbtrace_id": "XXXXXXXXXXX"
}
anyway to change the request and get the same data as before?
Found the answer here:
check this post
and I changed my request to:
143357502355510/feed?fields=insights.metric(post_impressions_unique,post_impressions){values,title}&since=1474732800&until=1477324800&limit=100
Related
Attempting to create Google My Business Local Post using My Business API and PHP.
A Local Post is created just fine EXCEPT when adding the mediaItem object to the post body.
Getting the error :
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"errors": [{
"message": "Request contains an invalid argument.",
"domain": "global",
"reason": "badRequest"
}],
"status": "INVALID_ARGUMENT"
}
}
Below is the post object with mediaItem that is being sent to localPosts->create
$new_post = new Google_Service_MyBusiness_LocalPost();
$new_post->setSummary('Hello World');
$new_post->setLanguageCode('en-US');
$media = new Google_Service_MyBusiness_MediaItem();
$media->setMediaFormat("PHOTO");
$media->setSourceUrl("https://www.webyhub.com/img/logo.png");
$new_post->setMedia($media);
You will need to do this on Postman to get the detail validation message as to why the image you used is invalid.
Try Advanced Rest Client (or Postman), make a POST request to https://mybusiness.googleapis.com/v4/accounts/{uuid}/locations/{uuid}/localPosts with
Header: Authorization: Bearer {access_token}.
Body Content Type: application/json
Body:
{
"summary":"test",
"topicType":"STANDARD",
"media":[{"mediaFormat": "PHOTO","sourceUrl": "https://example.com/files/test.jpg"}]
}
Also, Creating Post with video uploading is not currently available. I dont know why but I am also stuck on this matter.
I have created new YouTube account for test purposes. I got an accessToken for this account and tried to get my own subscriptions via YouTubeAPI.
I use Google APIs Client Library for PHP.
$data = $service->subscriptions->listSubscriptions('snippet', ['mine' => 'true']);
I get an error:
"domain": "youtube.subscription",
"reason": "subscriberNotFound",
"message": "The subscriber identified with the request cannot be found.",
"locationType": "parameter",
"location": "channelId"
"code": 404,
"message": "The subscriber identified with the request cannot be found."
I tried to change the YouTube account, and I got a successful result on my old account. But I want to get info on my new account.
What the problem?
Can anyone please explain how to use the share api of linkedin after the changes been updated as per my understanding I have updated the code and i am getting the below response. I tried using the share.php from https://github.com/EJTH/SLinkedIn
{"access_token":"AQXklP-2r5D1JQf5m_PfOMQoDcT6MCjaTHhAhaMDAbPP3CtB4aWsWPdEr4xt9jtDsABykDHixcqyCdjPdpuqdcpIUTql_DG6MHXaTfdAK9P_8cpItmLI6y2T7hBT-bBv0g-z-0TvUivFjrAvN-m_L1iXz_O7PnJcE60Gd00G3_VTY-ex4Bs","expires_in":5173195}{ "errorCode": 0, "message": "Unknown authentication scheme", "requestId": "5NWY2NR7YZ", "status": 401, "timestamp": 1436186085958 }1
{"access_token":"AQXLJf6S8KuOqqnXTx4Ujt0lJuAX7ETe2nrPirdnjDhl8RrPqem9dFbxZZa-EV91_rfaGpXcrFwGRUGNJFmqHnDY_rYHrlala3QwRWtGY4K5Ij6dmjBHrwZyUhrFj_plFqiFE2h8QukOUD5GkJegQOyLWMcGjeQQ_26e3nssM1F7uNzH4i4","expires_in":5183999}{ "errorCode": 0, "message": "Empty oauth2_access_token", "requestId": "8UMZSHXY4C", "status": 401, "timestamp": 1436187852689 }
Right now i can get the user's name,avatar,email of the user but when i try to use this for location https://graph.facebook.com/v2.2/1234567890/location im getting this message
{
"error": {
"message": "Unknown path components: /location",
"type": "OAuthException",
"code": 2500
}
}
resource url for user location is {id}/locations.
https://graph.facebook.com/v2.2/1234567890/locations
unfortunately , locations resource was deprecated in v2.0 or higher.accessing the above url will return
{
"error": {
"message": "(#12) user locations API is deprecated for versions v2.0 and higher",
"type": "OAuthException",
"code": 12
}
}
I am trying to get Google Play API subscription details using PHP and using following url to get purchase data :
https://www.googleapis.com/androidpublisher/v1/applications/[PACKAGE]/subscriptions/[SKU]/purchases/[PURCHASE_TOKEN]?access_token=[ACCESS_TOKEN]
I am getting the following error:
{
"error": {
"errors": [
{
"domain": "androidpublisher",
"reason": "developerDoesNotOwnApplication",
"message": "This developer account does not own the application."
}
],
"code": 401,
"message": "This developer account does not own the application."
}
}
Please help me sort out.
Just providing the URL does not help you get data of any application. How can you think so.? Isnt it insecure.? You have to get proper data by which you can at least prove ownership for the app..