drupal views facebook like button

亡梦爱人 提交于 2019-12-11 06:55:11

问题


I tried to add facebook like button to my veiws, which lists a particular node-type. I used views custom field module to add the iframe code.

The problem is when I click like..

it shows Nikhil liked http://example.com/node/44

instead it should have shown Nikhil liked node title on example.com.

Where am I going wrong.


回答1:


Use Open Graph tags:

http://developers.facebook.com/docs/reference/plugins/like




回答2:


oK , well I was able to achieve the above feature by following methods:

  1. Created a cck field url-alias under a content type for which views is being created.

  2. Using views-custom-field module, I put in the facebook iframe code.

  3. in my views I included the url-alias field in hidden form and used it to form the url in the like code.

  4. I also used the fb-social module and after that all my likes button were working as expected.




回答3:


You can check out how I did it here: http://www.jerryjr.com/adding-facebook-like-button-your-drupal-site



来源:https://stackoverflow.com/questions/3501820/drupal-views-facebook-like-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!