Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now detailing motivation, requirements, and usage

  • Loading branch information...
commit de1b0b348054583f1bc78163973c8bdeeef533a3 1 parent 46f2048
erik authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 readme
View
21 readme
@@ -0,0 +1,21 @@
+# Async Profile Fetch
+
+This sample code uses OAuth to allow users to authorize access to their Yahoo! Profile data, stores the access token, and then fetches this data asynchronously.
+
+Suppose you have a service that uses Yahoo! data requiring authorization via OAuth and you display that data on a publicly available page. For example, you have comments on your pages, and you use the Yahoo! Profile API to display the name Yahoo! Profile picture of each comment author. To do this, you need to store an OAuth access token for each user. To increase the performance of your page, you might want to request this data after the page loads.
+
+## Requirements
+
+ * PHP 4 or 5
+ * The [Yahoo! PHP SDK](http://developer.yahoo.com/social/sdk/#php)
+ * [A Yahoo! OAuth key and secret](http://developer.yahoo.com/oauth/)
+
+## Usage
+
+ 1. Download this project to your server.
+ Make sure it's accessible via the url you used to create your Yahoo! OAuth key and secret
+ 1. Edit _config.php_ to use your OAuth key, secret, app id, and callback url
+ 1. Edit _comments.php_ to use the Yahoo! guids of your users.
+ Normally, the user would be logged in at the time the comments are posted, so the guid would already be associated with the comments when they are viewed.
+ 1. Load _init.php_ in a browser and authorize access.
+ After authorization, you'll be redirected to _comments.php_, which will load the profile data
Please sign in to comment.
Something went wrong with that request. Please try again.