Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2015, 01:13 PM
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Embed a facebook post into vbulletin?

I searched but is there any way to embed a Facebook POST rather than just a video?

I tried fooling around with making a custom bb code with fb embed code but didn't' get very far.
Reply With Quote
  #2  
Old 10-09-2015, 02:56 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

https://developers.facebook.com/docs...embedded-posts

HTML Code:
<script src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.2" async></script>  
<div class="fb-post" data-href="https://www.facebook.com/FacebookDevelopers/posts/10152128760693553" data-width="500"></div>
That should do the trick, then the replacement variable should be the data-href URL.
Reply With Quote
  #3  
Old 10-09-2015, 03:08 PM
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since each post has the page's or person's name in it (in addition to the post number), I don't think it'll work as it does for videos.
Reply With Quote
  #4  
Old 10-09-2015, 03:19 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should work fine as long as they use the right URL to the post.
Reply With Quote
  #5  
Old 10-09-2015, 04:06 PM
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
It should work fine as long as they use the right URL to the post.
The embedding works but because the fb developers page address is hard coded into the bb code, no matter what post I put, it's alwasy the same one.

Code:
<script src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.2" async></script>  
<div class="fb-post" data-href="https://www.facebook.com/FacebookDevelopers/posts/10152128760693553" data-width="500"></div>
Reply With Quote
  #6  
Old 10-09-2015, 04:16 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You probably misunderstood me, people have to provide the whole URL in the bbcode for that, not just the ID.

<div class="fb-post" data-href="FULL_URL_TO_POST_BY_USER_HERE" data-width="500"></div>
Reply With Quote
  #7  
Old 04-28-2016, 08:00 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't work for me. For some people, it does, but not for all. If you know the reason why it doesn't work, it would be great.

And, interesting is, when I look at BBcode in BBcode manager, it works in small window next to each BBcode (Replacement video), but it doesn't show in posts. Like some crucial info is stripped from that area.

EDIT:

Inspecting element, this is what I see:

HTML Code:
<div class="fb-post" data-href="https://www.facebook.com/[AUTOLINK]slobodni.net[/AUTOLINK]/posts/992355867520543" data-width="500"></div>
Don't know from where this [autolink] comes. It obviously makes problem.
Reply With Quote
  #8  
Old 04-28-2016, 08:47 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe AUTOLINK is coming from another plugin?
Reply With Quote
  #9  
Old 04-29-2016, 05:35 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're right, it does. VaultWiki. You spotted it right. I'll try again with different post and video content.

EDIT: I managed to get working facebook video and post, except some (so far I see that they have permalink in their link).

Other problem is that I need to reload page to see them (full reload).

EDIT2: About last problem, it is caused by AJAX. Posts that go through AJAX don't show facebook content.
Reply With Quote
  #10  
Old 05-02-2016, 06:49 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought that not too long ago the iframe version of this was deprecated yet I still see the Javascipt and iframe versions available here:
https://developers.facebook.com/docs...ns/page-plugin

Just make sure you're using the most current version of the code or any code from facebook, keep it up to date as well including any apps in your facebook developers account.

It looks like Dave is right, seems to be another plugin inserting this into url.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05322 seconds
  • Memory Usage 2,249KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete