Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
zubair01
Posts: 70
Registered: ‎04-08-2011
My Device: BB 4 and BB 5.0
My Carrier: BB Curve

embed fb and twitter share

[ Edited ]

Hi! I am trying to embed facebook and twitter share button on my BB webwork application, but window.open doesn't popup.

 

Or Is there any other way to open share window in the same window like an hidden  iframe inside main page?

 

 

 

 

please check the code I'm using

 


           

 function shareFB(){
                var share = {
                    method: 'stream.share',
                    u: 'http://www.example.com'
                };
 
                FB.ui(share, function(response) { console.log(response); });
            }
        /*SHARE TWITTER START*/
        var shareTweet = function()
        {
            f='http://twitter.com/share?url='+encodeURIComponent(window.location.href)+'&text='+encodeURIComponent(...
           
            a=function()
            {
                //if(!window.open(f))
                //location.href=f;
                window.open(f,'twitterShare','width=100,height=100');
            };
            a();
           
            /*if(/Firefox/.test(navigator.userAgent))
            {
            setTimeout(a,0)
            }
            else
            {
               
            }*/
        };

 

Thanks

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: embed fb and twitter share

window.open won't work. You need to call the webworks api if you want to open a window in the browser and if you want to stay in the app, then you need to use ajax to load the content in a div, but I don't think this will let users login into Twitter or Facebook.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Developer
zubair01
Posts: 70
Registered: ‎04-08-2011
My Device: BB 4 and BB 5.0
My Carrier: BB Curve

Re: embed fb and twitter share

thanks for replying, so is there any way that I can share my app on facebook and twitter as we do with our web blogs.

Or can u refer me some link, I hav'nt found yet.

Please use plain text.
Regular Contributor
Cesar_Vanatur
Posts: 76
Registered: ‎02-17-2010
My Device: Storm
My Carrier: Vodafone

Re: embed fb and twitter share

Please use plain text.