Raised This Month: $51 Target: $400
 12% 

Help with Steam API returning json


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-05-2016 , 08:17   Help with Steam API returning json
Reply With Quote #1

Hello, it's been a while. I have a project at university where i am trying to retrieve game price with steam api in a json return. Thing it, i get this error:

XMLHttpRequest cannot load https://store.steampowered.com/api/a...price_overview. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'mywebsite.com' is therefore not allowed access.


and the code is something like this.

PHP Code:
var SteamStoreURL "https://store.steampowered.com/api/appdetails/?appids=" GameID "&cc=gb&filters=price_overview";


$.
getJSON(SteamStoreURL, function(data)
{
    var 
URLString JSON.parse(data);

    
console.log(URLString);
}); 
I really cannot get it to work. I am not a super web developer or something like that, but any help would be appreciated. I just want to retrieve the game current price using json javascript.
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode