Closed dafinaolluri closed 7 years ago
@dafinaolluri @georgeslabreche I need to check this one, for the moment don't have any good idea or solution
@ferideadili: For Twitter, this is easy. Just update the tweet text on the result page (make sure it is all URL encoded!).
For Facebook, it is tricky.
The image, title, and text for Facebook share are cached by facebook with the url as the key. Because of this, I think you need to make sure that every possible result has a unique URL.
Consider the following URL parameters:
A result URL would look like this: http://glasomer.rs/results?cid1=5&cid2=10&cid3=13&cp1=83.5&cp2=10&cp1=6.5
Furthermore, the title meta tag would have to be rendered so that it says something like "I match 83.5% with candidate Blah blah." You have to get the format of this text with the client. You only need to include in the result URL the parameters that will define the content of the facebook share dialog.
You need to ask the client what image they want for each possible match or if we use the same generic Glasomer image.
IMPORTANT: When sharing with Facebook, make sure you are sharing the home page url (glasomer.rs) and not your result page url.
Description
Also, we need to change text in post that user want to share.
For FB post:
Zanima te koliko se tvoji stavovi poklapaju sa stavovima predsedničkih kandidata? Proveri na Glasomeru. Glasomer pomaže građanima da uporede svoje političke stavove sa stavovima kandidata koji se takmiče na predstojećim predsedničkim izborima. Izabrani stavovi su u vezi sa aktuelnim društveno-političkim dešavanjima u Srbiji.
When you click Twitter icon than some strange link appeared in the post field.