Zomato - Menu fetch API (/dailymenu) - zomato-api

When i use Zomato API to fetch Menu(/dailymenu), its always returning the below response.
{
"code": 400,
"status": "Bad Request",
"message": "No Daily Menu Available"
}
Anyone had any luck with this?
I believe Zomato is not exposing Menu Data.
I was trying for the city of Dubai.

Daily menu is supported in Prague, Czech Republic only and not in any other city where Zomato is present.

Related

How to get Instagram profile data and media, from non Business/Creator Instagram account with Business Discovery API?

I'm trying to get Instagram profile data, and media using Business Discovery API, but in some cases i get an error.
For example: try to get data from this profile https://www.instagram.com/luxurycars2627/.
Request:
{FACEBOOK_API_URL}{ig-user-id}?fields=business_discovery.username(luxurycars2627){media{caption,comments_count,like_count,media_url,username,timestamp,permalink,children{media_url}}}
And response:
{
"error": {
"message": "Invalid user id",
"type": "OAuthException",
"code": 110,
"error_subcode": 2207013,
"is_transient": false,
"error_user_title": "Не удалось найти пользователя",
"error_user_msg": "Не удалось найти человека с именем пользователя luxurycars2627.",
"fbtrace_id": "AFErRS2FXb8ZYM66u-2zfIV"
}
}
error_user_msg - Could not find a person with the username luxurycars2627.
So, i don't understand why i getting this error. Profile is not closed, and exists. I don't know, is that profile business or creator. In my app need to get data and media from any profiles.
Maybe Business Discovery API working with only business and creators profile, so if that's it, how can i get profile data and media from non creator or business profile?
Thanx!

Is it possible that get likes count each facebook pages(not my page)?

I want to gather each facebook pages's total likes.
Not for posts, just page likes.
Is there any access token or some method for getting the information that I want?
I tried this using facebook graph api:
https://graph.facebook.com/v4.0/{page's name ex: uniqlo.kr}/likes
and I get the response:
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "A1LR4IU7npAvTZdHHn-zD_J"
}
}
I think maybe 'uniqlo.kr' is not to be page-id
How can I get page-id that isn't mine?

Receipt_id is null in Paypal response, How can I get it?

I have integrated Paypal with my rails application by activemerchant gem, As of now I'm getting token and payer_id, but I need receipt_id which is null in response.
I have followed steps given in this link.
Response of Paypal is given below
"timestamp"=>"2016-04-12T19:23:46Z", "ack"=>"Success",
"correlation_id"=>"000a000f000r", "version"=>"124", "build"=>"000000",
"token"=>"AB-000000000000000", "transaction_id"=>"kjKJKHkj09809FED2",
"parent_transaction_id"=>NULL, "receipt_id"=>NULL,
"transaction_type"=>"express-checkout", "payment_type"=>"instant",
"payment_date"=>"2016-04-12T19:23:46Z", "gross_amount"=>"160.00",
"gross_amount_currency_id"=>"USD", "fee_amount"=>"6.54",
"fee_amount_currency_id"=>"USD", "tax_amount"=>"0.00",
"tax_amount_currency_id"=>"USD", "exchange_rate"=>NULL,
"payment_status"=>"Completed", "pending_reason"=>"none",
"reason_code"=>"none", "protection_eligibility"=>"Eligible",
"protection_eligibility_type"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"secure_merchant_account_id"=>"JHBJKJKJBKJBKJH",
"success_page_redirect_requested"=>"false",
"coupled_payment_info"=>NULL, "Token"=>"AB-000000000000000",
"PaymentInfo"=>"{"TransactionID"=>"kjKJKHkj09809FED2",
"ParentTransactionID"=>nil, "ReceiptID"=>nil,
"TransactionType"=>"express-checkout", "PaymentType"=>"instant",
"PaymentDate"=>"2016-04-12T19:23:46Z", "GrossAmount"=>"160.00",
"FeeAmount"=>"6.54", "TaxAmount"=>"0.00", "ExchangeRate"=>nil,
"PaymentStatus"=>"Completed", "PendingReason"=>"none",
"ReasonCode"=>"none", "ProtectionEligibility"=>"Eligible",
"ProtectionEligibilityType"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"SellerDetails"=>{"SecureMerchantAccountID"=>"JHBJKJKJBKJBKJH"}}",
"SuccessPageRedirectRequested"=>"false", "CoupledPaymentInfo"=>NULL
Is there any configuration in Paypal account to get receipt_id, or any request parameter I have to add/change?
Please suggest.
Thanks in advance.
I have discussed this with paypal developer support and it seems like the transaction sale ID is the appropriate ID to record and return to the user, it is also what gets recorded in the paypal account for a credit card transaction so if a user had a support question, it is the easiest number to give to accounts to look up the transaction details.
I am not 100% sure about how to access what is called the receipt_id, but I don't think it is intended to be populated in the response to the payment endpoint. If you are to get a receipt_id at all, it will likely come from hitting the endpoint GET /v1/payments/sale/<Transaction-Id>
As per the api, receipt_id is defined as
Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.
I think "guest users" may have a specific meaning that is not relevant to just any transaction but I'm not positive on this.
I would recommend playing around with this endpoint after you get the transaction ID from the payments endpoint. The id located in the json returned from the payments endpoint at payment.transactions[0].related_resources[0].sale.id seemed to be the appropriate ID to record for a simple credit card transaction where I wanted to return a reference number to the client and to store for looking up the transaction at a later date.
I also was able to use that ID to interrogate the sale endpoint mentioned above for more information, but I never was able to get receipt_id to populate for a sandbox operation.
Hope this helps, I find some of the documentation to be lacking for the REST api.
"transactions": [
{
"amount": {
"total": "7.47",
"currency": "USD",
"details": {
"tax": "0.03",
"shipping": "0.03"
}
},
"description": "This is the payment transaction description.",
"related_resources": [
{
"sale": {
"id": "4RR959492F879224U",
"create_time": "2013-01-31T04:12:02Z",
"update_time": "2013-01-31T04:12:04Z",

facebook graph API company page URL?

I am working on some data analysis regarding beverage manufacturers in the US and would like to grab posts from the company facebook pages to mine some data using the standard facebook graph API. I am new to the facebook API and I am hoping to get some clarifications here that I can't find in the developer docs.
For a simple example lets look at 2 companies FB pages:
https://www.facebook.com/CocaColaUnitedStates
https://www.facebook.com/BellsBreweryInc
Now per the API documentation, I should be able to retrieve the posts on those public company pages via a URL as follows:
https://graph.facebook.com/COMPANYFBNAMEHERE/feed?access_token=MYTOKEN
or
https://graph.facebook.com/v2.5/COMPANYFBNAMEHERE/feed?access_token=MYTOKEN
This works for CocaCola: https://graph.facebook.com/v2.5/CocaColaUnitedStates/feed?access_token=MYTOKEN
This returns data as I would expect:
{
"data": [
{
"message": "The French \"yes! yes! yes!\" sounds like \"we! we! we!\" (lettered \"oui.\") \"C'est la vie\" sounds like (homonym) \"say LOVIE\" (like lovie dovie).\n\nSong of (rather than \"by\") Robbie Nevil: C'est La Vie\nhttp://www.youtube.com/watch?v=CGtf9QfITQw",
"created_time": "2016-02-06T02:52:17+0000",
"id": "820882001277849_452698638250376"
},
etc....
However when I try this for Bell's: https://graph.facebook.com/v2.5/BellsBreweryInc/feed?access_token=MYTOKEN
I get this:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "AWTxWye6vub"
}
}
I am not understanding why I am getting an error on Bell's page? It's a publicly available company FB page, so I can't imagine it's a restriction, but I can't understand why it wouldn't be returning the posts like CocaCola?
It sounds like the owner of the token you are using is below the legal drinking age. BellsBreweryInc is a page in the alcohol category so no data will be returned for users under the legal age. This is something BellsBreweryInc would have set in their page settings.
Age restircted websites require a user access token from a user account that meets the page requirements. I was using an app access token which is why it didn't work.
I needed to log into my account and generate a user access token and use that token in the URL.
Also, just realized that token expires in a couple hours. Anyone wanting to do this may also want to read this: How to extend facebook access token in python

"You must be a developer of the application" while accessing unified_thread

I get this response each time I want to access my chat history with a user:
{
"error": {
"message": "(#298) You must be a developer of the application",
"type": "OAuthException",
"code": 298
}
}
The FQL query I use:
SELECT message_id, sender, body
FROM unified_message
WHERE thread_id IN
(SELECT thread_id FROM unified_thread WHERE single_recipient = 'XXXX')
ORDER BY timestamp desc;
The tool I use:
Facebook Graph Explorer
The token I use:
app: my app
user: a non-developer account
My app settings:
marked as "Live and available to all users"
From what I've read, unified_thread was once restricted to developer accounts as it was being deployed by facebook, but today any doc says that we can use this table.
If I switch to a token with a developer account, it works of course.
Are there some restrictions to use these tables I'm not aware of?