How to create a service to use Twitter API in Symfony 2? -


I want to apply a service called "Twitter" to use Twitter API in my Symfony 2.3 website so that Administrators, I can use this service like this, for example:

  $ tweet = 'New post on my blog' $ Article ['title']; $ This- & gt; Get ('twitter') - & gt; Post ('Status / Update', Array ('Status' = & gt; $ tweet));  

But I'm new to APIs in general, and have no idea about how to implement this service properly and want to get some guidance.

You may find this useful:

  twitter: class: Path / to / twitterClass file:% Kernel.root_dir% / .. / .. / vendor / twitter / twitter.php logic: token:% parameters.twitterReadToken%  

You can add it to the container You can access via:

  $ this-> Container- & gt; Mill ('Twitter') - & gt; Post ();  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -