Uber API /v1/requests end_latitude and end_longitude are not working - uber-api

I'm using Uber's /v1/requests (https://developer.uber.com/docs/riders/references/api/v1/requests-post) API and trying to reserve a ride with end_latitude and end_longitude filled up.
I'm successfully able to book the ride, however, Uber is booking ride without including end location. When I open the Uber App the destination is missing. Here's my api request:
debug: APIRequest
payment_method_id=bb066422-573f-49d1-8eb0-3bedacae44ae,
product_id=6450cc0f-4d39-4473-8632-1e2c2049fefe,
start_latitude=47.57298189999999,
start_longitude=-122.3779403,
surge_confirmation_id=null,
end_latitude=47.6173975,
end_longitude=-122.1317191,
method=POST,
uri=https://api.uber.com/v1/requests
Could you help please?

Related

Google Ads REST API: The operation is not allowed for the given context., at operations[0]

I was trying to create a campaigBudget:mutate with all information that Google Ads API ask for, but no result, they show me only one error :
The operation is not allowed for the given context., at operations[0]
this screenshot may help you guys:
HEADER:
BODY (Req & Res):
and this is an example from Google Ads API:
Thank you
After research I found that the problem was CUSTOMER_ID
In header we should set : login-customer-id => MANAGER_CUSTOMER_ID
and in endpoint url we should set : /customers/CUSTOMER_ID/campaignBudgets:mutate

How to obtain the live video id of a facebook live video?

I am trying to access the live views count of a live video that is live through a Facebook Page. I am using the ID that I am obtaining from the API request {page-id}/videos/uploaded When I am using that video id and making a GET request of {video-id}?fields='live_views its showing error code of 100 with the message as:
(#100) Tried accessing nonexisting field (live_views) on node type (Video)
I have the following permissions:
'manage_pages', 'publish_pages', 'business_management', 'read_insights', 'user_videos'
I am making the GET request using user_access_token.
I am using Graph API Version 2.8.
Please let me know if I am using the wrong ID. IF yes, then how can i get the live_video_id of a live video posted in page?
To get the live views count of a video a fan page, you need:
An app created at facebook developer
A user access token (for testing, e.g. by calling https://developers.facebook.com/tools/accesstoken/)
The fan page id
With this you can call graph API in the following format:
https://graph.facebook.com/v2.8/<fan_page_id>/live_videos?access_token=<access_token>?fields=live_views
Of course, you may add more elements in fields parameter if you need more information. Here Facebook's Graph API explorer helps: https://developers.facebook.com/tools/explorer
When you add status to fields parameter, "LIVE" means, it's currently live, "VOD" means it has already finished.
If you try to implement a WebHook for it, let me now if it works. Thanks.
To get live views you need to call the api with the live video id, which you get from calling, page id can initially be either the page-id or name
"https://graph.facebook.com/v10.0/${page_id}/live_videos?access_token=${access_token}
Sample response:
{
"title": "hello world 2",
"status": "LIVE",
"embed_html": "...,
"id": "123123" // this is the live video id
},
After you have retrieved the live video id you can call this endpoint to get the live_views edge
https://graph.facebook.com/v10.0/${live_id}fields=live_views&access_token=${access_token}
sample response:
{
"live_views": 1,
"id": "123123"
}
Docs for endpoint 1: https://developers.facebook.com/docs/graph-api/reference/live-video/
Docs for endpoint 2: https://developers.facebook.com/docs/graph-api/reference/live-video/reactions#Reading
However I understand the confusion since live_views is not listed under the second endpoint as a reaction nor even is it a reaction, so either it a mistake in facebook docs or a mistake in the graph API, either the solution provided works.
Yes you do need to go through an app review to get the permission for tracking streams

API for Get venues for nearrby Location in foursquare

1)I want to fetch the venues for the nearby location by passing the latitude and longitude of to the API in foursquare.
I got this url:-thisand i got peroper response.
But for this latitude and longitude:- 32.3456,141.4346
(url)
I did not get any data.
Same for Facebook.I use this :- facebook API
But i want the list of generalized category listing from this API.And this API only gives me data of hotels only.Because i pass q=hotel.
2)How to get oauth_token for foursquare?
Please help me.
The reason you did not get any data for that location is because there are no venues in that area. If you follow this link you will see that location is in a remote area of Australia.
For help with connecting users to Foursquare, you can use these instructions

Titanium.Facebook getting graph api access token

I'm developing an iPhone app with Appcelerator Titanium SDK 1.6.2
I am upload an photo to a users facebook album with the Titanium Facebook module, graph api.
The upload goes just fine and returns the items unique ID.
When I try to parse the JSON from the unique id I'm told i need to pass an access token, which makes sense.
How do I get the access token to be passed to the graph request url?
When I do a XHR GET request while passing Ti.Facebook.accessToken I get the following error
URL: https://graph.facebook.com/10150527948301195?access_token=t4CqzHallahfy4d7RnERrJb4ffOkQfJvrYrGEBoZ4so.epdiI6IjJGR2ZFY1ZTMHh6RlR6ZmNIcVctMHcifQ.NBRMth0vb7pXKcd8lHNz9aremoyNpvrbhz2P3zkgWJU4eHdfewOp1WruBNZS_lSDy0XM0Xu0ACry8aEmSckGJVQJxEioykrNZhT7S9mJG2OKWqMdk6ucg5IMhXMfndF9sdKwWrWb7uPKI57LzIOf5lvA
{
error = {
message = "Unsupported post request.";
type = GraphMethodException;
};
}
And if I don't pass Ti.Facebook.accessToken I'm asked for it.
I'm bound to be missing something, any help would be greatly appreciated.
see this link http://developer.appcelerator.com/blog/2011/02/facebook-module-changes-in-titanium-mobile-1-6-0.html
I think you should be using Titanium.Facebook.requestWithGraphPath(...)

retrieve events where uid is the creator and application id is the admin - Facebook API

I would like to know if there is a Facebook API call to retrieve the events (eids) for all the events a user has created using my facebook connect application.
The events are created using the following REST api call:
https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token']
$e_i is the event info array where the 'host' value is set to 'Me' as follows
$event_info['host'] = 'Me';
On Facebook events under the "Created by:" section it lists "My user name,Application Name", I presume this is because I am the creator and the application is the admin as stated in the REST api documentation http://developers.facebook.com/docs/reference/rest/events.create/
Unfortunately I cannot seem to find out how (neither REST nor GPRAPH API) to return a list of events where I am the creator and the application is the admin as in the above scenario. If this is possible I would really appreciate some assistance with how it is done.
So far I have tried:
REST API events.get using uid=application_id. This only returns events created by the application not those including the user who created them
GRAPH API https://graph.facebook.com/me/events?fields=owner&access_token=... this returns all the events for 'me' but not where the application is also the admin.
It seems strange that there's no reference to the linkage between the event creator and the event admin through the API but in Facebook it is able to pull both and display them on the event details.
If you're using the Graph API try calling $facebook->api('/App ID/events') which should return all events managed by the application (http://developers.facebook.com/docs/reference/api/application/).
Later on you can check the creator's ID and compare it with the User ID.