Error with Deezer Javascript API: Valid token required? - javascript

My Deezer-app used to work fine with the Javascript API, but stopped working recently.
I get the following error:
{"error": "VALID_TOKEN_REQUIRED":true},"results":{}}
I can't find any information about this error and I have no idea how to debug it.
The url is www.rapucationals.com
Update: Please check out the code (www.rapucationals.com).
This is the call that fails: http://www.deezer.com/ajax/gw-light.php?api_version=1.0&api_token=a7cadc94893e55c9fd79da702354c86b&method=song.getListData&input=3&cid=0053621bf26d2cf98

Related

How to generate access token for youtube api?

I am trying to integrate Youtube API into my project but to start working with it, I need to generate the access token. I searched the internet and found multiple articles that confused me a lot. I have seen various methods to generate it, but none of them works for me.
I also tried this npm library, but this gives me the following error:
code: 403,
errors: [
{
message: 'The request is not properly authorized.',
domain: 'youtube.activity',
reason: 'forbidden'
}
]
I am tired of searching more on this, so if anyone has any idea to get it, Please tell me. It will be a great help.
Did you try to follow the official documentation? There are clear steps on how to get access.
https://developers.google.com/youtube/v3/getting-started#before-you-start

Stripe works in localhost but gives error in live

I'm currently developing a stripe checkout for my website, it's working in localhost but gives me this error : JSON.parse: unexpected character at line 1 column 1 of the JSON data. In localhost I get this error if I name in a JSON payment intent field that does not exist, I've already set the live website in HTTPS channel
Stripe has a support article that explains how to debug and fix this error.

Deezer JS API returning Location:http://www.mydomain.com.br/dz/channel.html#token|exception|unknown

im doing the software to play deezer`s songs, and im using the Deezer Javascript API.
But when i use getStatus of user there is a error:
Deezer JS API returning:
Location:http://www.mydomain.com.br/dz/channel.html#token|exception|unknown
and the throw exception:
Uncaught An error has occured, please retry your action
Or when i use login, the popup show the following error:
"You must enter a valid redirect uri"
What i need do to fix this errors?
You just have to set the domain of your website, not the whole URL and it will work.

Salesforce: URL Rewriter & JScript Remoting: Exception parsing json response: 'Unexpected token <'. Logged in?

I am getting an error when I use JavaScript remoting and have my URLReWriter turned on on my Force.com SIte. The error does not occur when using JavaScript Remoting with the URL ReWriter turned off.
The error is as follows
Exception Error parsing json response: 'Unexpected token <'. Logged in?
I'm confused as to why this is occuring. If I have no checks for being logged in in my URL ReWriter (or visualforce page) why should this occur?
Has anyone ever come across something similar to this before? I noted the following https://salesforce.stackexchange.com/questions/4112/possible-oauth-remote-action-bug but in my case I am not using authentication on my site for the test page that I created & I'm wondering why it mentions "login".
Is it possible that URLRewriters and JavaScript Remoting currently do not work together in general?
Thanks in advance for any help on this.
Can you try debugging it server side? Add "your_site_name Guest User" to the debug logs and try the action. If you're lucky you'll see something going wrong (in the remote action? in rewriter?) and I suspect this uncaught problem causes a redirect to maintenance page (which will be HTML, not JSON)...
If not - use Firebug or similar tool to inspect request & response in detail? Or event.status?
Can it be something related to permissions? http://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting.htm Or if you're returning html - I think you should have {escape:true}?
Does it happen in any browser? Maybe something doesn't like redirects caused by the URL rewriter. I've seen cases (not with Salesforce though) that antivirus software sometimes was adding some strange javascript at the end of certain websites and they had to be whitelisted...
The error may also happen due to parser error when page recieves status message from remote action function.
For example i tried Remote Action with attachment
#RemoteAction
public attachment attach(String body){
attachment a=new attachment();
a.body=body;
a.name='a.png'
insert a;
return a;
}
On the above code i receive error since SFDC does not parse the attachment object.SO if there are parser errors we get this message .
As a workaround i send as a wrapper .Hence i would suggest to investigate the return parameter of remote action and also wrapping it as workaround .
Hope this helps

Facebook Credits Demo Application returning error

We are participating in the Facebook Credits beta. After approval of our live app, we followed the steps from the API page to set up the demo application:
http://developers.facebook.com/docs/creditsapi
However, whenever we submit with the "Pay with Facebook" button, we are getting back error 1383008 ("The application you are using is not responding").
We've checked the server logs and confirmed that all necessary params are passing to http://apps.facebook.com/ajax/flows/?__a=1 as expected. We've also confirmed that the callback URL (callback.php from the demo app files) is never being hit.
Just to be certain this isn't a compatibility issue with the new JavaScript SDK, we set up the demo using the old JS SDK and got the same error.
Has anyone else experienced this issue with running the demo application (using either version of the SDK)? If we can't get the demo to run, we can't implement this feature in our live app.
Here is the request sent to the server (app ID removed):
deadbeef=2386512837&app_id=OUR_APP_ID&api_key&receiver=0&order_info=%7B%22title%22%3A%22BFF%20Locket%22%2C%22description%22%3A%22This%20is%20a%20BFF%20Locket...%22%2C%22price%22%3A%2210%22%2C%22image_url%22%3A%22http%3A%2F%2Fwww.facebook.com%2Fimages%2Fgifts%2F21.png%22%2C%22product_url%22%3A%22http%3A%2F%2Fwww.facebook.com%2Fimages%2Fgifts%2F21.png%22%7D&place=app&credits_purchase=false&flow_type=BuyItem&__d=1&post_form_id=57484628313c8345bd4e904f684e43e5&fb_dtsg=1GSvy&lsd&post_form_id_source=AsyncRequest
Here is the response returned:
for (;;);{"error":0,"errorSummary":"","errorDescription":"","errorIsWarning":false,"silentError":0,"payload":{"secure":false,"handler":"","title":"Application Error","userData":{"fbpayments_error":"{\"error_code\":1383008,\"error_message\":{}}"},"body":"<div class=\"pam uiBoxRed\">The application you are using is not responding.<\/div>","buttonsMessage":null,"buttons":"ok"}}
We have updated the Facebook Credits API sample application and documentation. If you are still having issues, please post your frontend code as well as your callback and we can take a look.
I was also having the same issue.. I was able to fix this. This error occurred for me was due the wrong call back url. I used my local_url
'http://localhost:3000/blabla'
instead of using
http://apps.facebook.com/application-name/

Categories