How to Publish a Facebook Stream With JavaScript

The easiest way to publish a Facebook stream with JavaScript is by using a pre-coded social plugin that's available to Web developers. The "Live Stream" plugin publishes a stream on any website or page the code is placed on. As well, it enables Facebook users on your site to publish directly to their wall and news feed. In a few minutes, you can install the social plugin on your site.

Things You'll Need

  • Facebook Developers account
Show More

Instructions

  1. Create Facebook App

    • 1

      Go to developers.facebook.com, then click the "Apps" tab and sign into your Facebook account.

    • 2

      Click the "Create New App" button near the upper right corner of the "Apps" page. Type a name in the "App Name" field, then check the "I Agree to the Facebook Terms" box and click "Continue." A new app is created with that name.

    • 3

      Double-click the long number below the "App ID/API Key" area. The text highlights so you can copy it. Press the "Ctrl" + "C" keys on the keyboard simultaneously to copy. You'll need the App ID to make the "Live Stream" plugin work.

    Live Stream JavaScript Code

    • 4

      Go to developers.facebook.com, then type "Live Stream" in the top right search box and click the "Social Plugins - Live Stream" search listing.

    • 5

      Press "Ctrl" + "V" keys simultaneously to paste the copied text into the "App ID" field.

    • 6

      Fill in or adjust the other plugin details to match your preferences and site's needs. The width and height are adjustable to whatever size best fits on your site or application.

    • 7

      Click the "Get Code" button. A pop-up dialog appears on the screen with the code. Highlight and copy the code by pressing the "Ctrl" + "C" keys at the same time.

    Install the Code

    • 8

      Launch a text editor on your computer, then open the main HTML document for your website or application.

    • 9

      Find a location between the <body> tags to paste the JavaScript code. Click the mouse cursor in that location.

    • 10

      Press the "Ctrl" + "V" keys simultaneously to paste the "Live Stream" code. No further editing on the code is necessary.

    • 11

      Save the HTML document, then upload it to your site's servers. Visit your website to test the functionality and to make sure it looks the way you wish it to appear to the user.

Related Searches:

References

Resources

Comments

Related Ads

Featured