I have the proper SSL certificates installed and my gallery 3 is connected via https.
How can I get my videos to play inside FaceBook when I share them and not my original Gallery site.
I used the FB debugger to check and all is in order there.
Social media embeds always require something extra. A quick search engine search gives what you're looking for. (This is not a Gallery thing; it's a Facebook thing.)
What's now missing when the link is shared is the video. I get the player box but the video itself isn't loaded.
Looking over the above I believe I need a tag to call the video itself just like the thumb is being called.
Question is what is the statement that will do it. For the thumb we use thumb_url(true)
What would it be for the video?
I believe the proper tag would be the same as the thumb meta but contain the video data. I've tried <meta property="og:video" content="<?= $theme->item->video_url(true)?>"/ >
but that just causes an error.
Any ideas or suggestions?
MikeLFD
Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-08-30 00:07
We are getting closer to the answer.
When I use: <meta property="og:video" content="<?= $theme->item->file_url(true) ?>"/ >
I get the file necessary: Party.mp4?m=1370413294
How can I strip the ?m=1370413294
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-08-30 02:14
The new slideshow module, I'm including video in an iframe like youtube and the rest. My method may be what FB needs.
One change that I can't seem to put my finger on and it'll work with the meta tags.
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2013-08-31 15:08
Quote:
How can I strip the ?m=1370413294
With some regex I would think would be a good option.
or try: $url = strtok($url, '?');
I think it should return everything up to the ? and remove everything else.
2nd: @floridave: Oooh: $url = strtok($url, '?');; I've got to try that. Learn something new every day!
3rd: @MikeLFD: You can also try $url = preg_split('?m',$url,0,PREG_SPLIT_NO_EMPTY);
(I'm not sure if the '?' needs to be escaped here; I don't it does, but I haven't tested, so if @floridave's solution doesn't work an the code I put there doesn't work, try escaping it.)
EDIT: @MikeLFD: Out of curiosity: Was the "?m=1370413294" causing a problem, or do you just not like the way it looks? I don't see why it would be an issue for the code you need. Again, just curious here.
MikeLFD
Joined: 2013-03-22
Posts: 79
Posted: Sat, 2013-08-31 21:32
Temp,
It's causing the video not to load inside Facebook.
The player shows but the video won't load. The ?m stuff conflicts with the meta tag some how when it looks for the mp4 to load and play.
MikeLFD
Joined: 2013-03-22
Posts: 79
Posted: Sun, 2013-09-01 12:19
Temp and Dave,
I'm guessing this code doesn't go in the meta tag. Least it doesn't the way I tried entering it
Posts: 1857
Social media embeds always require something extra. A quick search engine search gives what you're looking for. (This is not a Gallery thing; it's a Facebook thing.)
I've never actually done this, so your mileage may vary:
- http://www.longtailvideo.com/blog/19150/publish-your-videos-to-facebook-with-a-jw-player/
- http://stackoverflow.com/questions/4591764/how-to-embed-my-own-video-player-in-facebook
Posts: 79
Let me be a little more specific.
I have all the proper meta tags (but 1) as verified by the FaceBook Debugger.
What's now missing when the link is shared is the video. I get the player box but the video itself isn't loaded.
Looking over the above I believe I need a tag to call the video itself just like the thumb is being called.
Question is what is the statement that will do it. For the thumb we use thumb_url(true)
What would it be for the video?
I believe the proper tag would be the same as the thumb meta but contain the video data. I've tried
<meta property="og:video" content="<?= $theme->item->video_url(true)?>"/ >
but that just causes an error.
Any ideas or suggestions?
Posts: 79
We are getting closer to the answer.
When I use: <meta property="og:video" content="<?= $theme->item->file_url(true) ?>"/ >
I get the file necessary: Party.mp4?m=1370413294
How can I strip the ?m=1370413294
Posts: 8339
The new slideshow module, I'm including video in an iframe like youtube and the rest. My method may be what FB needs.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 79
One change that I can't seem to put my finger on and it'll work with the meta tags.
Posts: 27300
With some regex I would think would be a good option.
or try:
$url = strtok($url, '?');
I think it should return everything up to the ? and remove everything else.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1857
1st: I'm a super fan of @suprsidr's work!!
2nd: @floridave: Oooh:
$url = strtok($url, '?');
; I've got to try that. Learn something new every day!3rd: @MikeLFD: You can also try
$url = preg_split('?m',$url,0,PREG_SPLIT_NO_EMPTY);
(I'm not sure if the '?' needs to be escaped here; I don't it does, but I haven't tested, so if @floridave's solution doesn't work an the code I put there doesn't work, try escaping it.)
EDIT: @MikeLFD: Out of curiosity: Was the "?m=1370413294" causing a problem, or do you just not like the way it looks? I don't see why it would be an issue for the code you need. Again, just curious here.
Posts: 79
Temp,
It's causing the video not to load inside Facebook.
The player shows but the video won't load. The ?m stuff conflicts with the meta tag some how when it looks for the mp4 to load and play.
Posts: 79
Temp and Dave,
I'm guessing this code doesn't go in the meta tag. Least it doesn't the way I tried entering it
Posts: 27300
Does that work?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 79
Nope it crashes the website
Posts: 27300
you confused me with the video_url function
I bet you are going to have to wrap it up in more if checks to see if the item is a move as well or it might not work on photo or album pages.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Are we reinventing the wheel here?
http://codex.galleryproject.org/Gallery3:Modules:ogp_tags
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 79
That last code you posted was it. Thank you.
I have no idea if we are re-inventing the wheel.
The ogp_tags module doesn't have a download option to it, hence this thread
Posts: 27300
Yes it does from http://www.gallerymodules.com/
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Looking at http://fb.stevelarsen.co.uk/example.html it also allows form url query parameters so don't know if you need to sanitize the parameter or not.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team