facebook-like

How to preserve namespace information when parsing HTML with lxml?

此生再无相见时 提交于 2021-02-07 12:18:55
问题 >>> from lxml.etree import HTML, tostring >>> tostring(HTML('<fb:like>')) '<html><body><like/></body></html>' Note how the tag turns from <fb:like> to simply <like> . This makes processing pages that incorporate XFBML with lxml much harder. (Same thing happens to <g:plusone></g:plusone> ) Any help is appreciated. 回答1: Try adding the namespace prefix definitions that are missing. lxml will avoid the namespaces otherwise, supposedly to make it easier for you. Most likely the sites you try to

How to preserve namespace information when parsing HTML with lxml?

牧云@^-^@ 提交于 2021-02-07 12:18:00
问题 >>> from lxml.etree import HTML, tostring >>> tostring(HTML('<fb:like>')) '<html><body><like/></body></html>' Note how the tag turns from <fb:like> to simply <like> . This makes processing pages that incorporate XFBML with lxml much harder. (Same thing happens to <g:plusone></g:plusone> ) Any help is appreciated. 回答1: Try adding the namespace prefix definitions that are missing. lxml will avoid the namespaces otherwise, supposedly to make it easier for you. Most likely the sites you try to

facebook iframe App: Send/Like button z-index issue

我的梦境 提交于 2020-02-02 03:45:14
问题 We are having a problem with our facebook like/send button, if you open: http://apps.facebook.com/bymii-test/products.php?pageid=216605071714962&prd_id=35&prd_name=Coalesce: - click facebook send, the box is behind the facebook sidebar. Is there any way to: change the z-index - or to make the window pop up on the left? 回答1: I FINALLY FOUND THE ANSWER!! 1 1/2 Hours searching later.. just enter this code into your CSS file: .fb_edge_widget_with_comment span.fb_edge_comment_widget { top: 15px

Using social plugins for pre-existing Facebook posts

一笑奈何 提交于 2020-01-23 12:48:18
问题 If there a way to use the Facebook Feed, Comments, and Like social plugins for existing Facebook posts? We're looking for a way to have pages on our site supplementing existing Facebook posts made on our FB page. The goal is to keep all sharing, comments, and likes centralized around single post, rather than the usual model where each person shares a distinct post on their feed. Example post from McDonalds: http://www.facebook.com/photo.php?fbid=10151001277817014&set=a.10150319191897014

Why is Facebook returning the wrong page (affects Facebook Like and Share URL)?

核能气质少年 提交于 2020-01-22 19:17:08
问题 When we first put up a blog post, Facebook often (but not always) gets confused about what the page is. Specifically, if you try to use the Like button on the blog page OR if you try to share via the Share link on your profile, Facebook will see the root blog page rather than the actual post page. For example, we recently posted: http://thisorthat.com/blog/2010-song-of-the-year-round-1-results If the user "likes" it, it returns the title for: "http://thisorthat.com/blog" When you run the post

How can I make facebook like buttons faster?

為{幸葍}努か 提交于 2020-01-22 04:53:25
问题 in my website, for each blog entry I have a facebook like button. So on the index, there is multiple(more than 10 at the moment) like buttons. These like buttons make my page a bit cumbersome to use. The total page time becomes several seconds and it's laggy/jumpy while loading(even though all the content is loaded) while it's loading. Is there anyway to fix this other than not showing the like button on the index? (a single like button on a page produces negligible lag) For reference, my

Change the width of a like button

独自空忆成欢 提交于 2020-01-16 08:55:28
问题 I'm trying to change the width of the Like button on my site, but for some reason it's not working. I've tried the HTML5, iFrame and XFBML versions, but they all get rendered to the same size. Any ideas on what I'm doing wrong? Code is below. <!DOCTYPE HTML> <html xmlns:fb="http://ogp.me/ns/fb#"> <head> </head> <body> <div class="fb-like" data-href="http://www.facebook.com" data-send="false" data-layout="button_count" data-width="2000" data-show-faces="false"></div> <fb:like href="http://www

Facebook Like-button problem

久未见 提交于 2020-01-15 12:08:56
问题 I'm using this code to implement the like button <fb:like layout="button_count" show_faces="false" width="450"></fb:like> But when I try to click it the counter is increased for about 1 second and then it goes back to zero again. I can't see on my facebook profile that i've liked something either. Someone have a solution for this? 回答1: As other have mentioned some of your open graph meta tags may be missing or incorrect. You can valid your page with the Facebook URL Linter: https://developers

Facebook like in android

戏子无情 提交于 2020-01-14 06:15:47
问题 I am using the code shown below for like a url in facebook: String htmlCodeGoesHere="<div id=\"fb-root\"></div>"+ "<script>(function(d, s, id) {"+ " var js, fjs = d.getElementsByTagName(s)[0];"+ " if (d.getElementById(id)) {return;}"+ " js = d.createElement(s); js.id = id;"+ " js.src = \"http://connect.facebook.net/en_US/all.js#xfbml=1& appId="+APP_ID+"\";"+ " fjs.parentNode.insertBefore(js, fjs);"+ "}(document, 'script', 'facebook-jssdk'));</script>"+ "<div class=\"fb-like\" data-href=\"

HTML - How to efficiently do multiple Facebook Like buttons on one page

最后都变了- 提交于 2020-01-14 03:28:10
问题 I have a page where I need to have about 30 Facebook Like buttons. They all Like the same url. Basically just duplicate HTML code everywhere. Anyways, when you load the page, every single Facebook Like Button div makes calls back and forth to Facebook. You can see it in the dev tools going back and forth. Slows down the page load a lot. Is there a more efficient solution to this problem? UPDATE Let me ask an alternate question: Is there any way to dynamically connect each Facebook div like