Facebook Auth Dialog - Adjusting the text displayed - php

Just wondering if someone could point me in the right direction of how to change some text on the Facebook Auth Dialog. I've attached a screenshot of the information I wish to change, which I know is possible as I've seen it done on applications such as the Pinterest app.
Can't seem to see that section highlighted anywhere on! https://developers.facebook.com/docs/opengraph/authentication/
Thanks in advance.

The Auth Dialog uses an iFrame/separate window and therefore cannot be manipulated (design wise).
If you are simply changing permissions and text etc then use the app settings and the Auth settings here:
https://developers.facebook.com/apps
If you actually want to redesign the screen then your only option would be embedding the Facebook iFrame on top of your content and making it transparent (not good practice). The Auth dialog must be hosted on Facebook's server for many reasons, therefore I am certain this cannot be done without ugly workarounds.
UPDATE
It seems that you would like to change the permissions that your application requests. This is is very easy using the HTML for your login button. Just add this to your element:
scope="user_about_me,publish_actions...(any other permissions you want)"
However, I fear that you may want to take this a little further and actually display things like this:
This app shares routes you ran, loops you ran and other activity on
Facebook
Although this is pretty simple to implement using the Open Graph to add 'actions', you cannot simply write out the text. It generates it for you based on what actions you have.
Is this what you are looking for? If so, I will explain in more detail how you can achieve it

You can change the copy on the Dialog from the the app settings on Facebook. Settings-> Auth Dialog.

Related

What is the correct way to implement a facebook share button?

I'm trying to add a Share button to my website's various pages but I've found so many options I don't know which one is the most correct.
Official method:
https://developers.facebook.com/docs/plugins/share-button
I can't get this to work. If you'd like to check out a live example on my website pls comment :-) The share button appears, I click it, it opens but when I click 'share' again in the dialog, nothing happens. (the fb account is fine, I checked using other website's share buttons)
SO answer using share.php which I heard was no longer officialy supported:
facebook Sharer popup window
Finally the facebook share dialog (official):
https://developers.facebook.com/docs/sharing/reference/share-dialog
This method lists the use of 'app ID' which I'm having trouble with. It says to use a public ID and it IS required (not according to several SO questions), and I can't find how to do that.
Hence, I ask: What is one method that will surely work to implement normal share button (topic+image+small description) on my website?
Thank you.
I'd really need to see more of your implementation, but I have some thoughts.
As Facebook always requires the use of their Javascript SDK for their recent tools, you could check out that the SDK is loaded correctly.
Another thought: The SO answer with sharer.php seems a decent starting point. If you don't need everything to happen in a window/overlay, you can just create a simple link and point it to
https://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=Google&p%5Burl%5D=http%3A%2F%2Fwww.google.com
with p[title] as the page title and p[url] as the url of the page you want to share. This has been a reliable solution for me for years, as it doesn't rely on any Javascript and works in virtually all environments.
If you like you can always make the link open in a window via Javascript you can add yourself, so it's easy to debug.

How to update facebook page?

I am a PHP developer who was asked by a client to update their Facebook business page with changing statistics. Not by posting the information as status updates at an interval, but to update the Facebook page description like AJAX would update a page view counter. Is this possible? Can you point me in the right direction of how to implement this?
You're going to need to authenticate your application (this is also good reading here) and ask for extended_permissions, specifically the manage_pages permission.
This allows your application to login as a page.
Then you can modify certain parts of the page attributes.
There is a nice class available on phpclasses.org to aid in logging in with facebook, though their own PHP SDK is really nice when you get used to it.
Good luck!

How do you delete a Mention Tag using the FB API?

FB, having updated their API to disallow generic shares (Oct 2012), now require us to utilise built-in actions. Moving on from there, we can use Mention Tagging (https://developers.facebook.com/docs/opengraph/mention_tagging/) to allow messages and mentions be created - this is all fine.
However, on the same page above they say "You must also describe step-by-step how users can add/remove tags in your app." - but they neglect describing what call must be made to the API to do so.
Has anyone else done this successfully?
Say I have a user who's mentioned 5 people in an action post. Then say one of them would like to be untagged. I provide them a link to allow them to untag themselves, but what call should be made to the API.
Has anyone got any experience at this? All help appreciated.
Paul G
Say I have a user who's mentioned 5 people in an action post. Then say one of them would like to be untagged. I provide them a link to allow them to untag themselves
I don’t think you have to offer a link for tag removal to the other users that have been tagged by your user. Standard FB functionality through the facebook.com UI should enable them to do that already.
It does not make much sense to me to offer such links on your own to people that have been tagged by your app’s user, but might not even be using your app themselves. (To ensure that they are legitimately requesting to be un-tagged, you’d have to identify them first – by having them connect to your app. I don’t think that’s how Facebook want it to be.)
To me, the intention of the guidelines is more to ensure that you are building a clearly understandable UI for your app, for the process of the user entering his message. If they start to type #PaulG, and you want to “translate” that into a tag, f.e. by highlighting it in the text edit box like it happens on facebook.com, then it a) has to be absolutely clear to your user, that they are tagging someone this way, and b) you have to give your user a way of removing that tag right there and then (before posting his message), in case he does not want to tag a user, but just have the characters “#PaulG” stand for themselves in his message.

Can my website post to Facebook?

I have a PHP based website which has a post/comment system. Can I add a checkbox to my post function so that if it is checked the post will be published to Facebook as well as my own website at the same time?
I have looked through the docs on facebook and I saw a comment plugin, but it's not really what I am looking for.
I would appreciate a tutorial, links, code, or just general help.
If you're looking for a way to replicate the auto-posting functionality in the fb:comments plugin, the only way to accomplish that is asking the users to install an app. By using the sandboxed fb:comments social plugin, Facebook controls the user experience, so users can post to their wall without an install. If you use your own method though, you'll need to require an install (and publish_stream permissions).
I'd recommend using fb:comments if at all possible, since that creates less friction for your users and will be a more familiar experience for them. If you wish to do something with the comment as it's added, you can subscribe to the comment.create event.
May be you can use the Feed Dialog have a look: http://bit.ly/rQWC36
You can launch the dialog if the checkbox is checked, after submit the comments form.
Or may be you can use the OpenGraph API versión of the feed dialog, look for the section: "Graph API Equivalent" documentation doesn't sais nothing about permission on using that dialog this way. I hope it helps.
I am still unsure of what you are looking for but still facebook api is a good place to start off. A part from that, the checkboxes and automatically going to facebook that you have referred will be done according to your language/framework which you have not illustrated.

How to programmatically "press" a 'Like' button through a Facebook Application?

I'm developing this Facebook Application and I was wondering if it's possible (and how) to programmatically, through the Facebook PHP Graph API, press some 'Like' button on some page?
Of course, this is optional on my application... I'm still not ready to really explain what application I'm doing, but it would be interesting to code such a feature.
Is it possible somehow?
By your description it sounds like you're trying to get a user to like something without the users knowingly clicking a like-button. This sort of interaction is not condoned by Facebook, I think. There are various black-hatty ways to accomplish this though, one fairly elaborate one is descriped here: http://www.liquidrhymes.com/2010/08/25/smoking-hot-bartender-is-some-smoking-hot-facebook-spam/
UPDATE Sorry, I might be wrong. If you get stream_publish extended permissions from the user, you might be able to like posts on their behalf by doing a POST to /POST_ID/likes. See Publishing to Facebook in http://developers.facebook.com/docs/api
You cannot do this. Facebok wont let you do a POST to /POST_ID/likes, you can only do a get request to retrieve their likes. What you are trying to do is a violation of facebook's TOS. I would suggest just adding a like button and "forcing" them to like before they continue with your application. However, in my opinion even that is kind of silly because they can instantly go unlike it after they have used your application.
i was looking for the same thing, but not to force a user into liking something, but actually for their own protection.
here is where i come from: on a web site (maybe on multiple pages) there is an "I Like" button, implemented as described by facebook.
each time a user goes to that page, the browser will make a request to facebook, throught the iframe that contains the button, providing all the info that we are used to from a web server log file.
if the user has in the past logged in facebook and not cleared the cache. the request will also contain the cookie indentifying the facebook user.
so even more then analytics, facebook know all about the user activity on those pages.
so i wanted the user to only give this info when they decide to.
my solution was to have a button (as graphic only) on the page. when the user clicks it a new frame should open and only there the facebook code should be executed.
obviously on the new frame i could not put the normal "i like" code, since that would require a 2nd click for the user. at this point i would need the "programmatically clicking of the i like button".
it is not an opengraph solution, but it works: the frame just does a redirect to
http://www.facebook.com/share.php?u=URL

Categories