Salesforce doesn't have (or appear to have) any tutorials that deal with using their REST api with PHP. If anyone knows about a good tutorial to learn it or a link to put turn me in the right direction it would be greatly appreciated.
There's also this DeveloperForce Cookbook Recipe that shows how to call the REST API from PHP - http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php
While not PHP specific, I've the Apigee developer console useful for exploring the REST api.
Related
I am creating API documentations for my APIs. while creating am stuck in a problem that :
I want to generate server side code for my API by which user can easily implement that code. I read about "codegen" by swagger by which one can generate code in different languages. So any please suggest me how to use that feature to generate code in different language (java,php...). or any alternative for this. also Guide me if i am wrong at any point of view.
Thanks in advance.
Given that you've the API documented in OpenAPI/Swagger spec, you can use Swagger Codegen to generate PHP server stub (Slim, Silex, Lumne) very easily.
Please refer to the wiki for more information.
Hi there I was wondering if anyone could help me out.
Basically I am trying to use the trafficEstimatorService in order to retrieve how much traffic a keyword that is entered through a HTML generates.
I have an idea of how to make it work but I am totally new to using the google API.
Firstly would I create the form in php and perform a GET request on the trafficEstimator url with the keywords in the form as parameters?
Thanks!
I found that the hardest part of getting started was the Oauth Authentication. Ewan Hemming's tutorial on the subject helped me out a lot: http://www.ewanheming.com/adwords-api-oauth-tutorial
Take a look at https://github.com/googleads/googleads-php-lib
It's a php client library including examples on how to do things + a video which is a very good and detailed starting point.
If you already tried to follow Make Your First API Call and video with talk through instead of walkthrough of the steps and you felt confused and unclear, then here is step by step tutorial for you.
I am trying to create a system that can create jira tickets from our application, which is independent of jira.
I have heard of REST API and Soap API but I dont really know how to use these api?
Is there anything that can help me to get a kick start?
any help is highly appreciated.
Have a look at the documentation. http://docs.atlassian.com/jira/REST/latest/
A REST api usually accepts HTTP request with data and sends something back. And there are plenty of REST clients written in PHP, so you won't need to do it again. Just have a look at packagist.org and search for "rest" to find about 14 pages worth of related stuff, with "Guzzle" being the most used: https://packagist.org/packages/guzzle/guzzle
Read up :)
https://en.wikipedia.org/wiki/Representational_state_transfer
https://stackoverflow.com/questions/2217758/what-is-a-rest-api
I'm nearly finished building a simple web application that would really benefit from integration with Twitter through its API. I think the best way to do this would be through following and direct messages similar to how RTM has chosen to interact with users through Twitter. I learn best by analyzing examples, so I would like to find some good examples that illustrate how to use the Twitter API for interaction with users. Thank you.
My web application uses PHP and MySQL.
This is a pretty good article / set of examples for using the PEAR Services_Twitter library to do a bunch of different twitter actions including direct messages and following.
Using the Twitter API with PHP and PEAR: http://devzone.zend.com/article/4431
It is a year old though, so it doesn't use OAUTH. To find an example of that, check out the documentation:
http://pear.php.net/package/Services_Twitter/docs/latest/Services_Twitter/Services_Twitter.html
The Twitter API supports cUrl, so you can use that library to send the necessary headers and retrieve the data you require. A good example here:
http://applicationdeveloper.net/2009/07/12/post-twitter-curl/
I am creating a little flash game for the facebook platform, but I am finding it very difficult to get any decent documentation on the graph api and the PHP SDK, so if anyone has a decent resource for a beginner to go and learn the basics, I would appreciate it very much, as I am struggling to grasp the concept.
Thanx!
I agree that the docs can be pretty hard work for facebook. If you are looking to use the Graph API tho, bear in mind that it is just a REST API that uses oAuth for authentication, much the same as Twitter, SoundCloud etc.
The most awkward bit I found was authenticating properly so I would suggest checking out the oAuth website
http://oauth.net/
They also have some PHP samples which were what I used as a starting point. I'd definitely recommend starting from these rather than trying to build your own setup from scratch.
http://oauth.googlecode.com/svn/code/php/
I also found it handy to refer to the docs on some of the other sites that use oAuth, such as Twitter and SoundCloud as it helped build my overall understanding of what is going on, even if there were a few small differences from one site to another
http://apiwiki.twitter.com/Authentication
http://wiki.github.com/soundcloud/api/02-authentication
Personally I would suggest just trying to do a basic oAuth-authenticated request to begin with. Facebook Graph has a few extra options such as using scope for extended permissions. Whilst you will probably need to use these in the end, once you get your head round the signing mechanism its easy enough to add in these extra details.
Once you have got the hang of signing requests, it is just a case of requesting the appropriate endpoint for what you want using either curl or any other method that takes your fancy.
Hope this is of some use