I am talking about this plugin: https://github.com/amiyasahu/q2a-social-share/ The image should arise before the link like the usual facebook posts. Should I hack the plugin? Where? Is this the correct place?
function output_widget($region, $place, $themeobject, $template, $request, $qa_content) { $page_url = urlencode(qa_opt('site_url').$request); if ( ( $template=='question' || $template=='blog' ) && isset($qa_content["q_view"])) { $page_title = urlencode($qa_content["q_view"]["raw"]["title"]); }else { $page_title = urlencode(qa_opt('site_title')); } $social_button = ami_generate_social_buttons(array( '{{page_url}}' => $page_url , '{{page_title}}' => $page_title , ) , $template ); $themeobject->output($social_button) ; }
Is there a place where I should load an Image that could be located in the left side of the question?
That has nothing to do with the plugin but rather with the metadata in the link you're adding to your FB comment.
Take a look at this link: https://developers.facebook.com/docs/sharing/webmasters#images
Then you'll see that what you need to do is to add a meta HTML tag in your site. You can do so by modifying your theme like this:
function head_metas() { parent::head_metas(); $this->output('<meta property="og:image" content="http://yoursite.com/logo.png" />'); }
Or, if you happen to really use your logo URL for this you can also replace the URL with the options value qa_opt('logo_url')
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.