Announcement

Collapse
No announcement yet.

BBCODE for Twitch TV & Facebook sharing

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BBCODE for Twitch TV & Facebook sharing

    Hey guys,

    Looking to get hold of a BBCODE so I can embed Twitch videos/streams into posts. I did stumble across this : https://www.vbulletin.org/forum/showthread.php?t=284445

    However this is not working, which does not surprise me as it is based on a flash version. I have done research and I could not see any newer versions around on the net or on here so I am wondering if anyone could put together some magic.

    Twitch: https://www.twitch.tv/

    The other thing that would be handy is the ability to share a facebook post on in a forum post via BBCODE, Glenn put one together for Twitter, just wondering if FB is possible ?

    Thanks guys.

    #2
    Small update on the Twitch front, so I managed to create a BBCODE based one the following which embeds the player...but nothing is streaming

    Title: Twitch
    BBCode Tag name: twtv

    Replacement:
    <iframe src="https://player.twitch.tv/?channel="TwitchChannelNameHere"" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
    Example: [twtv]TwitchChannelNameHere[/twtv]

    For Facebook, I am getting a small window on the post but with no connection, using the below details. Anyone see anything wrong ?

    Title: Facebook
    BBCode Tag name: fb

    Replacement:
    <iframe src="https://www.facebook.com/plugins/post.php?href="YourPostHere"&width=500" width="500" height="5" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
    Example:

    Comment


      #3
      Where is the {param} placeholder in the replacement code?
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


        #4
        Assuming I am understanding your question correctly, let me bold the replacement parameters.

        <iframe src="https://player.twitch.tv/?channel="TwitchChannelNameHere"" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
        <iframe src="https://www.facebook.com/plugins/post.php?href="YourPostHere"&width=500" width="500" height="5" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>

        Comment


          #5
          I see what you mean now.

          So with Twitch I have tried
          <iframe src="https://player.twitch.tv/?channel= {Param} frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
          This still shows the embedded window but now with an error as per the attachment
          Attached Files

          Comment


            #6
            Based from the code you posted, you are missing the closing double quote for the src attribute. And do not add space after channel= and use lowercase p for param.

            Code:
            <iframe src="https://player.twitch.tv/?channel={param}" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
            Last edited by glennrocksvb; 03-08-2022, 12:43 PM.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              Well that worked like a charm for Twitch, thanks bud. I did try that with the FB code to see if that would fix it also but no joy with that. Any idea ? I have tried the two derivitives from the FB Devs page as below but not having too much joy yet, just blank posts.

              Code:
              <iframe src="https://www.facebook.com/plugins/post.php?href={param}" width="500" height="290" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
              Code:
              <html>
                <title>My Website</title>
              <body>
                <script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script>  
                <div class="fb-post" 
                    data-href={param}"
                    data-width="500"></div>
              </body>
              </html>

              Comment


                #8
                You shouldn't add html and body tags as the page already has them. There should only be one set of those tags on a page.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #9
                  Originally posted by glennrocksvb View Post
                  You shouldn't add html and body tags as the page already has them. There should only be one set of those tags on a page.
                  Ahh right so in reality what I should have is this ? I will give it a blast a little later to see if that works

                  Code:
                   
                   <script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script>     <div class="fb-post"        data-href={param}"       data-width="500"></div>

                  Comment


                    #10
                    I gave that a whirl and unfortunately still am not getting the embed. I am a little stumped at this point, Any idea ?

                    For reference my BBCODE Entry for the FB BBCODE is in the attachment to make sure I have not done something stupid, though they are the same settings I have used for BBCODES.

                    Attached Files

                    Comment


                      #11
                      After doing some Googling on the issue, I did find someone referencing the fact that Facebook contented put through Ajax will fail to display.

                      This is a discussion forum powered by vBulletin. To find out about vBulletin, go to http://www.vbulletin.com/ .


                      Could this be the issue ? I tend to get blank posts when trying to embedding fb content via BBCODE, so to me this made a certain amount of sense.

                      Comment


                        #12
                        Well not sure if it is the fact that VB runs as a more Ajax heavy platform these days that could be causing the fb posts not to embed or the Ajax page update plugin I have on my site causing the issue. I did disable the Ajax plugin to see if that made any difference, and nothing unfortunately. Any suggestions ?

                        Comment


                          #13
                          I suggest you use the iframe embed instead of the JS one.
                          Helpful? Donate. Thanks!
                          Buy me a coffeePayPal QR Code
                          Fast VPS Host for vBulletin:
                          A2 Hosting & IONOS

                          Comment


                            #14
                            I will try and bugger about with the iframe again and see if I can get it working, but everything so far on the VB platform is not working, whether it is something I am doing or whether it is Ajax or something else I am unsure. Must be a way.

                            Comment


                              #15
                              Small update and query here,

                              So I got the Facebook BB Code working to a degree. I can get the Facebook post embed working when previewing a post as the Facebook post shows up, but upon actually submitting the post, the post is blank. See examples below.

                              Preview of post showing FB Embed
                              Click image for larger version

Name:	Working-FB-Preview.jpg
Views:	165
Size:	69.4 KB
ID:	18131

                              Final Post submission (Blank)
                              Click image for larger version

Name:	No-FB-Preview.jpg
Views:	150
Size:	21.6 KB
ID:	18132


                              Now when doing the preview of the post that shows the FB embed fine, I do get the following error in my dev console which I believe may shed some light on the issue but I am unsure.

                              Click image for larger version

Name:	FB-Preview-Error.jpg
Views:	122
Size:	56.0 KB
ID:	18134

                              For reference the working BB Replacement code for anyone interested is as below

                              Code:
                              <iframe src="https://www.facebook.com/plugins/post.php?href={param}" width="500" height="290" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
                              Any thoughts glennrocksvb
                              Attached Files

                              Comment

                              Users Viewing This Page

                              Collapse

                              There is 1 user viewing this forum topic.

                              • Guest Guest

                              Latest Posts

                              Collapse

                              Working...
                              X
                              Searching...Please wait.
                              An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                              Please push the back button and reload the previous window.'
                              An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                              Please push the back button and reload the previous window.'
                              An internal error has occurred and the module cannot be displayed.
                              There are no results that meet this criteria.
                              Search Result for "|||"