First time here? Check out the FAQ!
1

Twitter and Facebook integration

Every askbot question has twitter and facebook buttons on the left side. When I click on the twitter button only the title of the answer is added into the twitter message box. When I click on the facebook nothing is added into the facebook message box.

  • Is somebody working on fixing these issues ? Can somebody please tell me how to add both the title and url of the question into these message boxes ?
kintali's avatar
141
kintali
asked 2012-06-12 21:00:35 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

Hello.

I think that the problem appears because the url that is constructed is broken. This is the one created ("undefined" it is an indication that something is broken):

http://www.facebook.com/sharer/sharer.php?u=undefined&ref=fbshare&t=Twitter+and+Facebook+integration

This should be the right one (instead of "undefined" the real url of your question):

http://www.facebook.com/sharer/sharer.php?u=http://askbot.org/en/question/7848/twitter-and-facebook-integration/&ref=fbshare&t=Twitter+and+Facebook+integration

And this is the result:

image description

Hope it helps!

alexandros.z's avatar
596
alexandros.z
answered 2012-06-21 17:30:43 -0600, updated 2012-06-21 17:35:14 -0600
edit flag offensive 0 remove flag delete link

Comments

Where is this code in askbot ? How do I get the current url ?

kintali's avatar kintali (2012-06-22 11:16:27 -0600) edit

I dont have the latest sources, so I am not sure about the exact lines of the source code. But you can find it in post.js. There is a function called socialSharing where defines about facebook sharing facebook: {url: "http://www.facebook.com/sharer.php?u={URL}&ref=fbshare&t={TEXT}",},

alexandros.z's avatar alexandros.z (2012-06-22 16:50:19 -0600) edit

Thanks alexandros.

kintali's avatar kintali (2012-06-22 23:41:28 -0600) edit
add a comment see more comments