0

URL

window.open("http://www.facebook.com/share.php?u=http://www.yahoo.com");

I have this code with me that works in javascript in HTML but does not work in the javascript code for my button.

this.controls['button'] = new KONtx.control.TextButton({
label: 'Share to Facebook',
styles: $content.styles.main.button, //Style information for the Button stored in our 960x540.js file
events:{
//Setup a onSelect Event to handle the button action
onSelect:function(event){
window.open("http://www.facebook.com/share.php?u=http://www.yahoo.com");
}
}
}).appendTo(this);

Is there any problem with my code?

by
5 Replies
  • QUOTE (siaokina @ Mar 13 2011, 11:32 PM) <{POST_SNAPBACK}>
    window.open("http://www.facebook.com/share.php?u=http://www.yahoo.com");

    I have this code with me that works in javascript in HTML but does not work in the javascript code for my button.

    this.controls['button'] = new KONtx.control.TextButton({
    label: 'Share to Facebook',
    styles: $content.styles.main.button, //Style information for the Button stored in our 960x540.js file
    events:{
    //Setup a onSelect Event to handle the button action
    onSelect:function(event){
    window.open("http://www.facebook.com/share.php?u=http://www.yahoo.com");
    }
    }
    }).appendTo(this);

    Is there any problem with my code?

    Please wrap your code in code tags when you post.

    http://developer.yahoo.com/connectedtv/faq...ml#asynchronous

    Also, if you want to load a new view you'd use KONtx.application.loadView. It looks like you're looking for a comparable behavior to window.open in the connected tv world.
    0
  • QUOTE (Benjamin Toll @ Mar 14 2011, 11:53 AM) <{POST_SNAPBACK}>
    Please wrap your code in code tags when you post.

    http://developer.yahoo.com/connectedtv/faq...ml#asynchronous

    Also, if you want to load a new view you'd use KONtx.application.loadView. It looks like you're looking for a comparable behavior to window.open in the connected tv world.


    Thanks for your reply and I apologise for not wrapping the codes.

    I have checked the forums and I am trying to use Facebook Connect to share my feeds like iPhone through a tv widget and I have found out that Facebook Connect actually does not work in TV platform according to here:

    http://developer.yahoo.net/forum/?showtopi...mp;endsession=1

    However, it is at 2009 and may I ask whether if i am able to use Facebook Connect in the TV platform now?
    0
  • It is possible, in fact, there is a Facebook app available on certain vendor devices which I wrote.

    We worked with Facebook directly to gain access to privileged APIs to accomplish what we wanted to do. I can tell you that it was quite a lengthy process and there was a lot of red tape. The primary concern from their side was security in dealing with the authentication between the app and their servers.

    Since Konfabulator is not doing anything specifically to prevent using any 3rdParty APIs I would suggest that this is something you would need to work with them on. Of course start by becoming familiar with their documentation... there is a LOT of it.

    It was my understanding last time I worked with their APIs that Facebook Connect was more of a browser framework. What you will want to use is something that is environment agnostic, like their REST APIs.


    Keep me posted on your findings but please do not post anything related to security that would expose keys, algorithms, or be considered an exploit.
    0
  • QUOTE (siaokina @ Mar 13 2011, 11:32 PM) <{POST_SNAPBACK}>
    window.open("http://www.facebook.com/share.php?u=http://www.yahoo.com");


    Just a reminder that window.open requires the DOM and since Connected TVs are not like your standard browsers, they are unable to load browser windows and render HTML.

    --Noble Metrics
    0
  • QUOTE (Rich Hubschman @ Mar 28 2011, 01:33 PM) <{POST_SNAPBACK}>
    Just a reminder that window.open requires the DOM and since Connected TVs are not like your standard browsers, they are unable to load browser windows and render HTML.

    --Noble Metrics

    Actually, we have a full W3C XML DOM. We just don't have a global window object.
    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets