addthis Menu API in flash

Posted: Wednesday, June 2, 2010 by Venkat Pola in Labels:
0

URL:-

https://venki.synchrolive.com/static/openMenu.html?addthis_config={username:%20%27dimdim%27,ui_use_addressbook:%20false,ui_cobrand:%20%27Web%20Meeting%27}&addthis_share={title:%27Web%20Meeting%20Widget%27,%20url:%27https://venki.synchrolive.com/static/dimdimWebinar2.swf?widgetParams=mid/e5c8bb01-a6ae-40c9-b670-e207859fa17b/furl/aHR0cHM6Ly92ZW5raS5zeW5jaHJvbGl2ZS5jb20v/op/saas:venki:all:v_branded:default:venki:default:en_US/rec/0/tim/0/tra/0/reg/0/%27,%20swfurl:%27https://venki.synchrolive.com/static/dimdimWebinar2.swf?widgetParams=mid/e5c8bb01-a6ae-40c9-b670-e207859fa17b/furl/aHR0cHM6Ly92ZW5raS5zeW5jaHJvbGl2ZS5jb20v/op/saas:venki:all:v_branded:default:venki:default:en_US/rec/0/tim/0/tra/0/reg/0/%27,%20height:%27310%27,%20width:%20%27250%27,%20screenshot:%27https://venki.synchrolive.com/content/branding/saas/venki/all/v_branded/default/widgetThumbNail.png?v=803.3787565845996%27,%20email_template:%27dimdim_default_template%27,%20email_vars:%20{var1:%27Dimdim%20Software%20Private%20Limited%27,var2:%271-978-735-2110%27},%20templates:{twitter:%27Please%20register%20for%20my%20online%20event:%20{{url}}%20via%20@dimdim%27}}&type=more


For flash, we have to use share end point API. But unfortunately we have so many limitations in this API. Actually Menu API provides so many features like ( Email tempaltes, service exclude and all... etc) but we can use this API in only in javascript.

I have a strong requirement to use Menu API in flash, so to achieve this i have written one wrapper page, please find the above url for this page. Where type is either "more" or "email".

Solution:- Copy the source code of this page and host it in your webserver and invoke this page from flash as

var addthis_config:String ="{" +
"username: '"+getAddThisParam("username")+"'," +
"ui_use_addressbook: "+getAddThisParam("ui_use_addressbook")+"," +
"ui_cobrand: '"+getAddThisParam("ui_cobrand")+"'" +
"}"

var addthis_share:String="{" +
"title:'"+getAddThisParam("title")+"', " +
"url:'"+getAddThisParam("url")+"', " +
"swfurl:'"+getAddThisParam("swfurl")+"', " +
"height:'"+getAddThisParam("height")+"', " +
"width: '"+getAddThisParam("width")+"', " +
"screenshot:'"+getAddThisParam("screenshot")+"', "+
"email_template:'"+getAddThisParam("email_template")+"', " +
"email_vars: {"+emailVars_key_value+"}, "+
"templates:{twitter:'"+getAddThisParam("twitter")+"'}" +
"}"

var type="email" or var type="more"

var request:URLRequest = new URLRequest(configPath+"static/openMenu.html?addthis_config="+addthis_config+"&addthis_share="+addthis_share+"&type="+type);

navigateToURL(request,"_blank");

I hope,all of you get it how to make use of Menu API in flash.

Good luck!!

Enhanced by Zemanta

0 comments: