Joomla plugin user group restriction or article unpublish restriction - facebook

I have an issue with ALL facebook comment plugins out there... We use Joomla 3.
While having such a plugin enabled, facebook fetch the article BEFORE publishing date (which always is set in the future on the site), with the result of a 404 error.
Upon publishing facebook doesn't refetch the article when our reader tries to share it on facebook, resulting in 404 error message on facebook, even though the article is live and published.
If I go to the facebook debugger, and refetch, it works alright - but we can't do that with all articles every day.
Is there a way to restrict a plugin to be executed either if the article isn't published, or to a certain user group?
My suspicion is that this occurs if an editor checks his article before it is published, so if I can restrict the plugin for special user groups it could maybe work..?
Appreciate any ideas...
With kind regards,
- Johan.

Open the main PHP file in the plugin, and then, in the beginning of the function onContentBeforeDisplay add the following code:
if ($article->state != 1)
return '';
Do the same thing for the function onContentAfterDisplay.

Related

Facebook messenger checkbox plugin is hidden (already checked other answers)

I have the same problem like asked here: Facebook messenger checkbox plugin is hidden
I tried the implementation of the Facebook Checkbox Plugin according to Facebooks documentation but it won't show on my VM in my Company.
The Facebook SDK Implementation works fine, I tried the "Share" and "Like"-Button, which show up correct.
I have a Facbook Page which has public access and a Messenger APP in DEV-mode. The "Send-API" from Facebook works correct too: I am able to send message to myself as administrator from my Webpage on my development VM.
Following Steps are done: use a random user_ref on every request, set my page on the whitelist, use "https", visit my page FB-loggedIN and FB-loggedOut
But the result ends in Markup and Log-Infos like this screen:
See FF DeveloperTools Markup Screenshot for current state
According to this I visited a page given as origin where the Plugin should work (see first link in my question) - but there the plugins' HTML is the same like mine.
So is there a general problem on Facebooks' site or is there quite more necessary, to get this plugin running? Could it be a problem with self-signed certificate on my VM?
At the moment I don't want to notify or login any user. All I want is that the checkbox is shown.
Pherhaps anyone has an idea or the same experiences :)
Additional Info: the console shows following message
fb:messenger_checkbox failed to resize in 45s
after some fiddling we found out that a registered webhook is required (even if you dont consume the events) to make the messenger checkbox plugin render properly.

Debug Facebook Instant Articles in browser

according to this page (https://developers.facebook.com/docs/instant-articles/analytics) on the Facebook Instant Articles documentation is possible to debug them in a browser using the following url:
www.ia-tracker.fbsbx.com/instant_article_test?url=<share-url>
Now I keep getting the following error:
Notice The trackers are run in same environment as Instant Articles,
except that the base url is different. On Instant article, it's the
url, that the user shared.
I tried to use the canonical url, without http, with www but nothing worked.
Have someone been able to use this method successfully, and if yes what they mean by "share url"?
The debug page doesn't actually render your page in the browser, it running the tracking code it finds just like they would be run in the instant article renderer. If you open the source code of the page you will see that there is a tracker code loaded.
The purpose of that page is to test analytics code, not the FIA itself.
Basically you will have the error if you put wrong URL or if you put the URL to the article that doesn't have FIA implemented. That notice that you get is sign of successfully loaded analytics code from the FIA itself.

Facebook comment plugin doesn't work at all

I inserted the facebook code where required and absolutely nothing happens or shows up. Using dreamweaver cs6 and in live view or when testing in ANY browser, nothing shows up. It's a blank box. ANy thoughts? I read somewhere that the website must be made into an application of facebook? Is this something?
Specifically, after activating the plugin and properly connecting the plugin to the facebook app,which does work and has been used extensively before hand, comments simply fail to load. There is no comment box, no past comments pull in either (note the app has historical comments already).
In the plugin settings area on the right side of the screen where the comments check box exists, there is a read more link that takes you to the facebook developers page where it discusses adding the facebook comments iframe.
If there is some other location where comment settings might also exist (past the three fields that require the 2 keys and the app name) I could not find them and this was not referenced in the plugin setup.

Domain blocked and no data scraped

I recently purchased the domain www.iacro.dk from UnoEuro and installed WordPress planning to integrate blogging with Facebook. However, I cannot even get to share a link to the domain.
When I try to share any link on my timeline, it gives the error "The content you're trying to share includes a link that's been blocked for being spammy or unsafe: iacro.dk". Searching, I came across Sucuri SiteCheck which showed that McAfee TrustedSource had marked the site as having malicious content. Strange considering that I just bought it, it contains nothing but WordPress and I can't find any previous history of ownership. But I got McAfee to reclassify it and it now shows up green at SiteCheck. However, now a few days later, Facebook still blocks it. Clicking the "let us know" link in the FB block dialog got me to a "Blocked from Adding Content" form that I submitted, but this just triggered a confirmation mail stating that individual issues are not processed.
I then noticed the same behavior as here and here: When I type in any iacro.dk link on my Timeline it generates a blank preview with "(No Title)". It doesn't matter if it's the front page, a htm document or even an image - nothing is returned. So I tried the debugger which returns the very generic "Error Parsing URL: Error parsing input URL, no data was scraped.". Searching on this site, a lot of people suggest that missing "og:" tags might cause no scraping. I installed a WP plugin for that and verified tag generation, but nothing changed. And since FB can't even scrape plain htm / jpg from the domain, I assume tags can be ruled out.
Here someone suggests 301 Redirects being a problem, but I haven't set up redirection - I don't even have a .htaccess file.
So, my questions are: Is this all because of the domain being marked as "spammy"? If so, how can I get the FB ban lifted? However, I have seen examples of other "spammy" sites where the preview is being generated just fine, e.g. http://dagbok.nu described in this question. So if the blacklist is not the only problem, what else is wrong?
This is driving me nuts so thanks a lot in advance!
I don't know the details, but it is a problem that facebook has with web sites hosted on shared servers, i.e. the server hosting your web site also hosts a number of other web sites.

Facebook Send Dialog fails to send links to Facebook itself -- why?

I'm trying to use Facebook Send Dialog in a WinForms frame with a browser control and direct URI (you can repro just by clicking the links below). It works fine with link=http://www.foo.com, sending the message properly if you enter a message and click "Send":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.foo.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
However, this fails with link=http://www.facebook.com or any path under it. Clicking "Send" just gets you "Sorry, something went wrong. We're working on getting this fixed as soon as we can.":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
The aim is to write a script to make it easier to send messages asking all users in a particular group to a page (prepopulating the recipient list). Since Facebook has restricted groups larger than 500 members, our organization has to move to a Facebook Page, and I want the Send Dialog to link the new Facebook Page. Why won't this work? Is there a workaround? Are there other criteria for what links Send Dialog will and won't send?
Also, is there a way I can determine whether the send occurred or not, for example an event to catch? Whether you send or cancel, the Navigated event is still redirect_uri/#_=_.
Once I have Send Dialog working, I will add Show-FBSendDialog to Facebook PowerShell Module, which already has numerous capabilities to automate Facebook from PowerShell.
ran some tests and it seems it is blocking any fb domain http://on.fb.me/91S2P8, sometimes this is temporary otherwise need to rethink...
I see your second link isn't working... but if you add your company page id or name to link it should work. following link works for me:
https://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com/Intel&redirect_uri=http%3A%2F%2Fjonnewman.com%2F&display=popup&to=100002395463043
hope this helps
I got solution. I also had same problem. No post helped me. Solving error for 2 days.
There were posibility of two mistakes(that was done by me).
Link Parameter given in url should be working. I have linked to api namespace but not given SSL url. So it was giving problem. You can given your web site address.
And redirect_uri parameter should be working. Try to give redirect_uri to same page most probably.