FB Canvas Blank After Authentication - facebook-php-sdk

https://apps.facebook.com/canvas_starter_app/ ← please use this link to see the template in action and to see the github link to look at the source code I am trying to use.
In my scenario, it Authenticates but it's blank afterwards except for the message from the author.

Related

LinkedIn share returns cached URL when sending to a specific person Issue

Lately i've been working on a share button which should take some specific information on the website and post it on LinkedIn. The website is an single-page application with Angular ui-router.
I followed LinkedIns developer guide docs with the customized URL to execute this action. My link looks like this:
https://www.linkedin.com/shareArticle?mini=true&summary= Description
&title= Title &url= Url &picture= Image.
Description, Title, Url and Image are unique values which is set by the content of the page and i've set the Open Graph meta tags:
meta property="og:title" content="website title"
meta property="og:description"
content="website description"
meta property="og:url" content="website url"
meta property="og:image" content="website image"
Since the page is an single-page application, the page "never" really reloads, but just changes the content inside the body element. Therefore i've created some Javascript to do the job for me which works like a charm with LinkedIn sharing to your network but "sending to a specific person" is inserting the wrong url.
When the user enter our website, locate to an article they want to share and click on the LinkedIn icon in the top right corner, a new tab appears. In the new tab, the user sees the title of the page, some of the url link and some of the description. They can check whether to share an update or / and send to a specific person. If the user checks to share an update with their network, the correct information is set with title, description, image and url. But when the user wants to send it to a specific person, which the user is notified about in their messages, the title and description is correct, but the link is not.
This issue seems to be connected to some sort of caching. If the user visit a new page, where no one has shared any article or so on linkedIn via the website, the correct link for both the network and the person, who is recieving the message. Let's say it is website.com/#3/5521. But when another user wants to share a different article on the page, the message url link is set to the first one, that the other user earlier shared. The link should have been website.com/#3/9978 but is set to website.com/#3/5521 no matter what i do. It's the same link that sharing with your network gets as when sharing to a specific person, so i can't see, how i can deal with this problem properly.
I hope this gives an idea of what the issue is. Tell me if you guys need any more explaining.
The problem appears on this website, if you want to see it in live action:
http://gentofte.viewer.dkplan.niras.dk/plan/52#/23703
Thanks in advance.
I'm not experiencing this problem at all. Is it still broken?
Here I am trying to share this URL: http://www.revoltlib.com/?id=17. I am using this URL...
https://www.linkedin.com/sharing/share-offsite/?url=http%3A%2F%2Fwww.revoltlib.com%2F%3Fid%3D17
This is the screen on sharing...
And this is the result after sharing...
It appears to work! Is it still broken for you?

Contact-form-7 from Wordpress: no success message displayed

I am using contact form 7 (version 3.8.1) with Wordpress 3.9.1, and I can't make the "successfully sent" message appear (or any other message). However, the message is sent successfully.I researched about this topic, but everything I found were posts from 3 years ago, so they were using older versions and it didn't help me. I would like to know if there is any possibility to make it work, or which alternatives I have to this free plugin.
Same things happened to me with contact form 7 which did not display a success message after clicking on the send button. Just add below code at the top or in the contact form 7 at the section -> FROM Code Is
<h3>[response]</h3>
You can replace the <h3> tag by your choice!
Just had this issue. The problem was incorrectly closed div tags, which resulted in no success or failure messages. Be sure to validate your HTML.
The "successfully sent" message is loaded via jQuery, and it sounds like there is a jQuery or Javascript conflict with the theme and other scripts that are loading.
Use Firebug with Firefox, or use the developer tools in Chrome or Safari or IE to see what Javascript is loading on your site. Send yourself an email and see what errors you get.
If you're using any scripting in the "Additional Settings" section, try removing and retesting. I have encountered Javascript conflicts if those functions are invalid.
For example, it is common to use the on_sent_ok hook to trigger events, but the hook needs to be compatible with the version of the Google Analytics tracking code on your site.
Mark3000 has already shed light on it. Check if you have tied your form to Google Analytics goals - meaning if the form is sent you see it as a conversion in GA. You do that by placing a code in Additional Settings tab of Contact Form 7 (hook on_sent_ok mentioned by Mark3000).
Now the problem is that you may have Google Analytics code removed for wp admins, not to have GA recording your visits (admin visits) as external traffic on your website. You remove the GA for admins in almost all plugins for SEO (All In One SEO, Yoast, Monster etc.). And when there is no GA script on the site the success message will simply not be triggered - that's the secret.
To look it up you may try to open the page with your form in the incognito/private mode and see if you get the success message to show up.
I've solved the riddle thanks to chaddosan answer in the following thread in wordpress.org forum https://wordpress.org/support/topic/contact-form-7-not-displaying-sent-message/
PS. By the way Contact Form 7 author has deprecated the on_sent_ok https://contactform7.com/2017/06/07/on-sent-ok-is-deprecated/
After a visitor of your blog submits the contact form, the visitor sees a response message from Contact Form 7, such as “Your message was sent successfully” or “Validation errors occurred.” I sometimes hear from users who tell me that the position of the response message is not good, and, in fact, sometimes their visitors miss the message entirely.
The response message is shown at the bottom of the form by default. You can change the location by putting a response message placeholder [response] inside the form. You can insert this [response] tag into any place of your choice. You can use it multiple times in a form. The response message will be shown within the placeholder after submission.
For me, it was solved by disabling js optimization at the autooptimize plugin.
I have found that the issue may be attributed to some basic settings that some admins may or may not have checked that pertain to the latest version of Contact Form 7.
One thing to check is that the id= attribute to the shortcode can be checked to verify that the page with the form is using the correct contact form that you are intending to use in Contact Form 7. In my case it is on my Front Page of a very good theme called Mesmerize. If you import the "Personal" site import, you get a popup that says you should install Contact Form 7 and enable it if you want all the features of the imported page to work (i.e. the contact form at the bottom of the page).
So, the first thing I found was that the theme import called "Personal" was not using the correct shortcode for the default contact form in Contact Form 7 plugin and I found that the only difference was the id= instantiation. In the settings for the Contact Form 7 form it was alluding to use this shortcode:
[contact-form-7 id="9" title="Contact form 1"]
and in the Theme Customization for the form it showed the 3rd Party Form Shortcode as a different id="#". After using the shortcode from Contact Form 7's form that fixed any issue where my published form was using the incorrect form id.
Then I added the tag for the response or "success" notifications to appear in the same form box by using the before mentioned fix of adding this tag to the top of my form code:
[response]
Hence my form code near the top looked like this after adding it:
[response]
<label> Your name
[text* your-name] </label>
This allowed a box to appear after submission of a form that has a green outline to the box but no words were visible, however after inspecting it in Chrome, I found the words were there but were in a font color of white. Against my white background they were invisible. Highlighting the inside of the box with my mouse revealed that the problem now was simply to change the color of the response text and this is done by editing the theme's "Additional CSS" section to make the word's visible.
In your WP admin Dashboard menu on the left side of the screen, mouse over Appearance menu (left side).
Click on Customize.
On the left side scroll down to the Customize menu titled "General Settings" and click it.
Now click on Additional CSS.
Enter this code into the window provided for additional CSS code:
#wpcf7-f711-p302-o1 > form > div.wpcf7-response-output {
color: black!important;
}
Click on Publish and your site is fixed.
I will admit the issue was frustrating but a simple fix was the one that revealed the issue. Some themes or default settings of the two brought a lack of the response in Contact Forms 7, fixing that, and doing some quality assurance between my theme and my form fixed the id instantiation issue, then the styling that made the text visible is what gave the full fix in my case. I hope this helps someone. Here are the various web apps and versions of the entire platform that I believe were pertinent to the issue:
PHP version 7.4
WordPress version: 5.7.1
Mesmerize Theme Version: 1.6.106
Autoptimize Version 2.8.3 (required by Mesmerize Theme)
Contact Form 7 Version 5.4
Mesmerize Companion version (1.6.122) (required by Mesmerize Theme)
WPForms Lite Version 1.6.6
Cheers!
The help reply line of Disable all other plugins and switch to default theme is well worn-out, but still should be one of your first approaches towards debugging the issue. I've found that in about 90% of the cases, it is due to a conflict with another plugin or theme.
Another helpful debugging tool is to hook out the after send call, like so:
add_action('wpcf7_mail_sent', 'my_custom_mail_sent' );
function my_custom_mail_sent( $contact_form ){
// to get form id
$form_id = $contact_form->id();
// to get submission data
// $submission = WPCF7_Submission::get_instance();
//$posted_data = $submission->get_posted_data();
}
This issue is actually a feature. If you are logged in as an admin to the WordPress dashboard, the success message doesn't show, though all functionality works. If you logoff the admin user for that WordPress site, the success message will automagically start working.
This same thing happened to me. I removed the HTML comment and the success message started showing.
[<!-- Remove HTML Comment -->]

Which file to change this code...?

I embedded some code for a mailchimp form on a post on my wordpress blog.
I signed up to the list to test it, but the form signed me up to a different list in my mailchimp account.
It's the form in the main section on this page: http://wordfruit.com/blog/fish-and-the-blackbird/
I want the form to enable people to sign up to a list with the title 'Publications Updates'. Instead, it's signing people up to the list 'How to Write to Persuade and Sell', which is a list connected to a form in the sidebar of the site.
Mailchimp told me this: "it looks like (as you mentioned) you're embedding the correct code, but at the bottom of your website there is some script that is overriding what you're doing when you embed the form. Specifically, there is a section at the veeery bottom of your page's source code that has a reference to the "How to Write to Persuade and Sell" list. This screenshot shows the section I'm referring to: http://screencast.com/t/rbw44HzeY - What I'd suggest doing would be to go into your site's code and replacing the section in that screenshot with this ID: 827164e224.
My questions:
I can't find the file with the source code the mailchimp guy mentioned. What would likely be the name of the file?
Any idea how that code could've got there? I only added the 'How to Write to Persuade and Sell' signup form into the sidebar...
It looks like this js file is inside /blog/fish-and-the-blackbird.js or similar.

Error when trying to share an article URL by permalink

Our CMS uses permalink, for example this one:
www.kingmagazine.se/artiklar/king-kroner/20120713/10-korthallare
When a user is trying to share this URL by pasting it into the "update status" field on their Facebook homepage, Facebook seems to try fetch a different URL to get the open graph info, as illustrated in this image:
http://i.imgur.com/NjYM9.png
The page fetched seems to be an error message from the site. The image is not relevant to the article specified but rather contained in the footer of all pages.
However the CMS also has internal URL:s, such as this one (for the same article):
www.kingmagazine.se/artiklar/?id=152539
When sharing that one on Facebook, the correct data is fetched, as illustrated here:
http://i.imgur.com/wV5q3.png
I have tried digging in our server logs to no avail - it seems like Facebook is requesting the wrong URL and not the complete permalink. I have also tried the Facebook Lint but haven't found any reason.
Has anyone got any ideas?
Sorry for the garbled links but Stackoverflow spam prevention said max 2 links and no images. :(
Just wanted to get back to this question if anyone else has the same problem, as we eventually found the solution.
The reason of the faulty information on Facebook was that the editors in the CMS had a preview function which showed the article as rendered to the visitor. These pages (as they included the site header/footer) also contained Facebook like buttons through the Facebook social plugin.
This meant that Facebook was 'pinged' of the article before it was actually published as the editor was previewing the changes. When Facebook tried to fetch the article, an error message (with an incorrect HTTP status code I might add) was returned which Facebook then cached.
Silly enough. :)

LinkedIn Share does not handle "#" in the URL

I am running into an issue while using Share feature of LinkedIn when the shared URL has "#" in it.
My URL looks like this: http://shoshin.glgqa07.com/#!/content/detail/High-pay-without-advanced-degrees
When I share this URL on LinkedIn, it strips out everything after "#". So the page linked on the LinkedIn is pointing to http://shoshin.glgqa07.com/.
I am using following URL to Share page to LinkedIn.
http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fshoshin.glgqa07.com%2F%23!%2Fcontent%2Fdetail%2FHigh-pay-without-advanced-degrees&title=The+Shoshin+Project+%3A+QA+tesing&summary=&source=
When I do View Source on the above page (Shared news on LinkedIn page), the Hidden Input field "contentUrl-shareForm" has value "http://shoshin.glgqa07.com/" instead of the complete URL.
I am using ShareThis library to implement this feature.
Does anyone know solution to this problem?
Did you try to replace the sharp sign (#) with the ASCII code %23

Resources