In order to start working with the SDK, you'll need to get a new web-based application ID and OAuth consumer key and secret. These keys will provide you with general access to the Yahoo! Social Platform, and allow your users to authorize your application to access protected resources and information.
The source code and sample application is hosted publicly on GitHub at http://github.com/yahoo/yos-social-php.
yosdk/lib/in an appropriate location on your server.
To create a new session using
initialize it by using your consumer key, consumer secret and application
ID you just got as parameters. From here, the SDK will detect it's environment
and create a session. (It may re-direct the user to log-in if needed.)
Once a session is initialized (and the user has authorized access to the application) you can now access social information for the logged-in user. The depth of user data you can access will depend on the permissions for which your application asked.
Each method returns a standard PHP object (the decoded JSON response from the API).
Yahoo! provides two means for you to share your user's activities back to other Yahoo! users:
You can use these channels to advertise your user's use of your app to a large audience of Yahoo! users, driving this larger group to your product.
The sample code below shows how to set a user's status and post an update to their activity stream.
Using Yahoo! Query Language (YQL) in your applications lets you query for data across many other Yahoo! APIs and other data sources across the internet. Learn more about Yahoo! Query Language (YQL) here.
The sample query below gets the user's location and queries the GeoPlanet API in order to return structured place data.
Check out the ready to use sign-in buttons on the Yahoo! Updates Assets page.
Questions and suggestions on the SDK are discussed on the YOS Developer forum. If you have any questions or need technical support, please use this forum.
The SDK source code and samples are provided free of charge, subject to the Yahoo! Social SDK License, unless otherwise noted.
Your use of YQL is subject to the YQL Terms of Service.