cross domain.
--- a/autotweet-php/src/Org/W3/AutotweetBundle/Controller/DefaultController.php Tue Sep 03 19:08:40 2013 +0900
+++ b/autotweet-php/src/Org/W3/AutotweetBundle/Controller/DefaultController.php Tue Sep 03 19:15:39 2013 +0900
@@ -20,7 +20,6 @@
}
public function postAction(Request $request)
{
- header("Access-Control-Allow-Origin: *");
if ($request->getMethod() == 'POST')
{
@@ -40,6 +39,7 @@
$this->tweet($msg);
}
}
+ $response->headers->set('Access-Control-Allow-Origin: *');
return $this->render('OrgW3AutotweetBundle:Default:post.html.twig', array());
}
private function tweet($msg)
--- a/js/w3c_talks.js Tue Sep 03 19:08:40 2013 +0900
+++ b/js/w3c_talks.js Tue Sep 03 19:15:39 2013 +0900
@@ -67,7 +67,7 @@
}
// Global variables for tweet posting
- var url = 'http://localhost:8888/~hiroto/autotweet/app_dev.php/post';
+ var url = 'http://tekka.keio.w3.org/~hiroto/autotweet/app_dev.php/post';
var hashtag = getMetaTag('hashtag');
var author = getMetaTag('author');
var title = document.title;