Ok, so I have a question regarding publishing data with the spark core. I followed this tutorial here: Tutorial: Getting Started with Spark.publish()
I did everything and I was able to get my spark core to publish data through the api.spark.io web site. What I want to do now is publish this data to my company’s web site. My company has already set up a site that you can connect your spark core to and also should be able to publish with api. I do want to keep the company anonymous, so Lets just say the web site is called mywebsite.com. The company has set up api.mywebsite.com which should allow you to publish data through. So I tried using the html code from that web site except I changed the part of the code that says:
var eventSource = new EventSource("https://api.spark.io/v1/devices/" + deviceID + "/events/?access_token=" + accessToken);
I changed it to:
var eventSource = new EventSource("https://api.mywebsite.com/v1/devices/" + deviceID + "/events/?access_token=" + accessToken);
and when I run it it only gives me the first screen but when I click connect, it just says that it is waiting to receive data and it never actually gets anything I guess. Could someone please tell me why it won’t receive the data? and yes before someone asks I do have the access token linked to my company’s web site and everything. All the help is appreciated!