Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (40 sloc) 1.585 kb
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:friendpicker="com.yahoo.friendpicker.*"
layout="absolute"
initialize="handleInitialize(event)"
styleName="fpApplication"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<friendpicker:FriendPicker id="friendPicker" width="350" height="500"/>
<mx:Script>
<![CDATA[
import com.yahoo.oauth.OAuthConsumer;
import com.yahoo.social.YahooAccessToken;
import com.yahoo.social.YahooApplication;
import mx.events.FlexEvent;
private static const CONSUMER_KEY:String = "YOUR_CONSUMER_KEY";
private static const CONSUMER_SECRET:String = "YOUR_CONSUMER_SECRET";
private function handleInitialize(event:FlexEvent):void
{
var flashvars:Object = Application.application.parameters;
var consumer:OAuthConsumer = new OAuthConsumer();
consumer.key = CONSUMER_KEY;
consumer.secret = CONSUMER_SECRET;
var token:YahooAccessToken = new YahooAccessToken();
token.key = flashvars.yap_viewer_access_token;
token.secret = flashvars.yap_viewer_access_token_secret;
token.yahoo_guid = flashvars.yap_viewer_guid;
try {
friendPicker.setup({
application: new YahooApplication(consumer.key, consumer.secret, flashvars.yap_appid, token),
type: flashvars.type,
subject: flashvars.subject,
body: flashvars.body,
cancelURL: flashvars.cancelURL
});
} catch(e:Error) {}
}
]]>
</mx:Script>
</mx:Application>
Jump to Line
Something went wrong with that request. Please try again.