Block public button when share on facebook - objective-c

Is it possible to disable the public button on the Facebook page so that users always share in public and they can't change it to only me.

No, you can't force the user to post something more widely than they want to
If you find a way to, you should submit it to Facebook's whitehat program and if it checks out you may get a cash bounty

Related

block redirect link to login in joomla and add a popup instead of that

In joomla the default function if a guest clicks a link with a registered access level, is to redirect guest to the login page.
Is there a way to show a popup instead, for all of registered access level links?
For example it redirects to
your.com/login.html
But i want to show a login-button before the guest is redirected.
I found another template where it works like this, but it wont work in my own template. How can I do it in my template?
if(JFactory::getUser()->guest) {
//do user logged out stuff
}
else {
//do user logged in stuff
}
There is no simple fix. The problem is that when it is added, you dont really have information about where a link leads to. If you create an article that is public, and you add a link to an article that is restricted, then joomla does not check this when you add the link.
In the event that joomla can know this beforehand, like restricted menu items, or listing of article links in a category, restricted links will not be displayed to a guest user.
If you want to try to change the behaviour like you want to, then I would consider in what situation this actually happens. If it is links in articles that is the main problem, then the best would be if the editors, when adding links to restricted content, also added a predefined class or something to this link. Then use JQuery to disable the link and display a popup on click. A similar approach could be used in other contexts.

How to deactivate facebook share button after click

is there some way to deactivate FB share button or mark it like "done" after sharinig content? Like button have two states which indicates if I "like" it or not. On the share button is not visible if I shared the content or not. Is there a way to do it?
Thanks.
The only way i could think of is by authorizing a user with publish_actions. In that case, the response will be the new post id, as you can read in the docs: https://developers.facebook.com/docs/sharing/reference/share-dialog
BUT: You should not do something like that anyway. Let the user share stuff several times if he wants to. He may want to select different recipients for the share.

Google+ JavaScript API: How to detect user sign in status?

I have deployed Google+ Sign-in Button, now I have to provide Sign-Out Button, before that, I need to know whether the user is still signed in, by which I can then show or hide this button.
I found this documentation: gapi.auth.checkSessionState(sessionParams, callback):
https://developers.google.com/+/web/api/javascript?hl=en#gapiauthchecksessionstatesessionparams_callback
Could someone demo how to use it ?
Many thanks.
gapi.auth2.getAuthInstance().isSignedIn.get()
This returns boolean
You don't need to use a separate function call to determine the user's signed in state if you've already added the sign-in button. The sign-in button's callback is going to trigger either on sign-in, when the page loads, or any time that the user's signed-in status changes. The page load trigger (immediate mode), will also help to indicate if the user is a Google signed-in user or not.
See monitoring the user's signed in status, which shows the different status fields that you can check (Google signed in, app signed in, or signed out).
From Google dev docs :
If you pass null to sessionParams.session_state, you can check if the user is signed in to Google, whether or not they have previously authorized your app.
So your code will be like this:
gapi.auth.checkSessionState({session_state: null}, function(isUserNotLoggedIn){
if (isUserNotLoggedIn) {
// do some stuff
}
});
This is an example of how to use it:
gapi.auth.checkSessionState({client_id:'99999999999.apps.googleusercontent.com'}, signinCallback);
where client_id is the id of your project on g+ console. and siginCallback is a function i created to check the state.
IT'S VERY IMPORTANT to notice that the official api documentation says:
If the argument is true, the supplied session_state is still valid. If the argument is false, it is no longer valid and the application should perform a new re-authorization flow with immediate set to true to get an up-to-date access token or detect a non-authorized or nonexistent Google sign-in session.
But when i recive the response of checkSessionState i get true value when im signed off and false when im signed in. I Dont know if there was an error on the documentation but you can try it by yourself.
Hope this has been helpful for you.
PD: excuses for my awful english
Adapted from Tom Anthony's Blog
One simple way you can use without the use of an API to see if a user is logged into Google + (Or Google/Facebook/Twitter) is to try to access a resource which they would only be able to access if logged in. The code below attempts to load an image resource for which the user needs to be authenticated to access. By default html <img> tags run onload() if an image is successfully returned, but onerror() otherwise.
<img style="display:none;"
onload="function(){document.getElementById('signOutButton').style.visibility = 'hidden';}"
onerror="function(){document.getElementById('signOutButton').style.visibility = 'visible';}"
src="https://plus.google.com/up/?continue=https://www.google.com/intl/en/images/logos/accounts_logo.png&type=st&gpsrc=ogpy0"
/>

Sharing a private URL in google plus

I am trying to use https://plus.google.com/share?url=<URL> to programmatically share a site to a private circle on Google Plus. It's not a problem when I use an externally visible website, but I would like to share a private URL (host on an internal network).
When I use a private URL, the plus sharing page shows a spinning icon, as though it's trying to access the internal URL for content, and the 'share' button remains dim - I cannot move forward.
I tried adding noverify=true or verify=false, etc to the GET line, but that didn't change the behavior. I suspect it can be done, because I can post private URLs via the taberareloo plugin on chrome.
Is there a way to skip probing the provided URL link, or otherwise post a private URL when posting to Google plus circles using the https://plus.google.com/share?url=<URL> mechanism?
Thanks.
No, there's no way to skip the fetch of the target page when you use the share link.
The fetch is how the snippet of your page, that is shared to Google+, is created. Without this fetch there would not actually be anything to share.
Kind of a funky workaround, but you could have a public page which is just a redirector (not a 301, but rather a javascript or meta redirect), and provide that link to G+. It would understand it to be a normal public page, while the user experience would be to get redirected to your internal link.

Why is my connect with facebook on my site not working?

When I click on the login button on http://www.coupean.com/user/login
I get an error.
What am i doing wrong to setup in Facebook App?
Do I need to touch anything on Open Graph?
When I want to submit the "like' action it always gives me this message:
No Aggregations created for this Action Type. Please create a completed Aggregation populated with sample data before submitting for review.
so i set up the aggregation...
but I do not know what this actually means and if i am doing them right.
![enter image description here][4]
How can we make the login work? Could you please provide a detailed explanation?
I cannot post up images here so:
please go to
http://www.coupean.com/images/s1.png
http://www.coupean.com/images/s2.png
and s3.png and s4.png under the same root url
https://www.facebook.com/dialog/permissions.request?api_key=APP_ID&app_id=APP_ID&...
You obviously need to insert your app's app ID and API key...
Additionally you now need to reset your app secret since you just made it public in one of your screenshots.