Facebook app Id for WordPress Plugin development - facebook-like

I'm building a small social WP plugin (more for learning purposes than anything else) and I'm trying to get my head around the various social networking sharing api's etc.
With regards to Facebook sharing, there seems to be the requirement for an application ID. Thats easy enough if this a one time thing, on a single site, but in the case of writing a plugin, I obviously would want it to be easy for users to install and setup, and not neccessarily have every user have to put one in from an options panel.
It seems to work when removing it from the FB.init, though I'm developing locally, and get an error when trying to use the like button.
Is an APP ID 100% required? and if so can I as a plugin author use one (think this gets paired with a website URL so not sure if its even possible) or the plugin that would
Anyone experienced with this got any tips?

For using the feed dialog, you do need an App (with ID). But you can - of course - just use your own App and just put it in the plugin. The App ID is nothing secret, and with that way you can also monitor the usage with the Facebook Insights.
There is one option without the feed dialog: sharer.php
It is exlained here: How to use Facebook Sharer in PHP
Just keep in mind that it is deprecated though (see other thread).

Related

Facebook API for custom feelings/activity

I was searching in the Facebook API documentation, but I can't find what I am looking for. So, what I am looking for is is there an API for creating your custom DO action. For example:
John Johson is riding a bike.
What I want is to send this 'riding' as a custom word coming from my app. And also 'bike' as a custom item as well.
The other example I can think about is the running apps in Facebook. When you start to run and connect the app with your Facebook the app can say.
John Johson is running using Runtastic.
Thanks!
Well, you’re a little too late on that one.
That used to be possible, it was called Custom Open Graph Actions - https://developers.facebook.com/docs/sharing/opengraph/custom
But those are now deprecated, you can not use them any more in new apps (and for existing ones, they will be removed within a year as well), see https://developers.facebook.com/docs/sharing/opengraph/custom-open-graph-deprecation
Now you can only use the built-in actions and objects, https://developers.facebook.com/docs/reference/opengraph

Displaying my own analytics data to unauthenticated users

I am writing this question after considerable investigation into this matter.
I have gone through Google's easy dashboards (gadash JS library), superProxy and plain analytics API, and couldn't find the best solution for my needs, although I can't believe my needs are so uncommon.
This is why I am turning to you, I have got a feeling I am missing something.
My requirement:
Display my own analytics account data to users on my website, preferably with Google's chart API or ga-dash, to resemble google analytics views as much as possible.
Users will not have to take part in authentication with Google API
Each user has his own query which is built dynamically !! (this is probably why superProxy cannot work for me because I think you need to manually set the queries in advance)
I use django-python as the basis for my website
problems with solutions I tried:
GAdash library - the problem is that each user has to be authenticated, and shown their own data, meaning they need access to my profile- that's simply not what I am looking for. It works great, but only for me. On the other hand if there was a way to make my profile truly public...
superProxy - sounds like a solution for this need exactly, however I don't think that you can programmatically set the queries.
I did find a way to retrieve the data for a query on the server side using my own credential which is a bit hacky, I am still missing that JS library which will parse this XML on the client side and display it as charts.
EDIT:
I ended up using Mark's solution (embeddedanalytics), since I could not find a better, easier solution.
Other alternatives were:
1. superProxy (lacking the ability to dynamically, programmatically loading new queries)
2. gaDash library - requires authentication from each user
3. Implement my own server side querying, and display to the user with some js graphics library - which would require considerable work on my side.
Check out www.embeddedanalytics.com. This is a platform/service which will do exactly what you are looking to do (disclosure - I work with them).
We also support your requirement that each user have its own dynamically built query. This is what we call our CMS Integration version. Are you trying to create a dashboard system for a CMS system you have built?

A simple and up-to-date way to implement Facebook login in a Django app

This issue is very common in stackoverflow, and there's a lot of different questions and answers about it, yet I couldn't find exactly what I need.
First, I'd like to define exactly what I need: the option to let users log in to my app using their Facebook credentials. The app will save a matching classic Django user. I will only need to use the user's profile picture and to make sure that each time the same Facebook user will be related to the matching Django user.
Unfortunately, I find it really frustrating to implement for the following reasons:
By now, after reading a lot, I couldn't find out what is the best package for this task.
Some people recommend django-social-auth and praise its functionality and documentation. Personally, I don't understand why, since it's not specifically for Facebook and there are no explanations about the client side, i.e the Facebook login button and how the whole flow works.
When you go to Facebook developers, you suddenly find yourself reading about some magical javascript sdk, and about a promise that that's all you need. Then you get frustrated again and can't understand how a client side related sdk can sign up users to your app.
I know developers somehow implement Facebook auth packages in their apps, but I just can't figure out how to do it.
If anyone could tell me: at this time point, what is the best way to add Facebook authentication to my Django app? I would also ask for detailed documentation / tutorial that explains how to log in a Facebook user, from settings and configuration level through signup to Django app and to client side code.
There are multiple ways to approach the problem, what is the "best" way is really subjective.
Subjectively speaking, you could opt for django-allauth. Here are a few pointers to help you get started:
If you want to keep the signup simple, set SOCIALACCOUNT_AUTO_SIGNUP to True in order to achieve a "no questions asked" login. Users simply approve the FB dialog and they end up logged in in your site right away.
Adding a login button to your template is merely a matter of:
Sign In
The app offers support for the JS SDK login (pro: users are accustomed to the typical FB popup that appears), or you can use your own OAuth flow. Whatever you please.
The fastest way understand FB's Oauth 2.0 flow is to play with FB's Javascript SDK. Once you get the hang of it, the FB's PHP library is similar. Also, other OAuth sites like Google, Twitter or Dropbox have almost identical implementation.
In baby steps:
Learn how to install FB Javascript SDK onto a simple page
Use FB.login to determine login status and obtain the login url.
Lastly, use FB.Event.Subscribe and subscribe to auth.statusChange to detect the login/logout changes.
Also, good to check out https://developers.facebook.com/roadmap/ on the upcoming features or features being removed.
django-social-auth is not just for Facebook, but that doesn't mean you should use all the backends available.
Project documentation is at http://django-social-auth.readthedocs.org/en/latest/index.html and Facebook backend details at http://django-social-auth.readthedocs.org/en/latest/backends/facebook.html.

Best Drupal module for facebook Opengraph and Linked in

i wanna create alumni association website using drupal.so user(student,alumni,staff) can sign up/login using facebook/linked in.their details should be fetch from their social network profile.so which module is suitable for this criteria.Thanks in advance.suggest me.
Let me share my experience with Drupal and Facebook and related modules.
Out of all the modules in there, I liked drupal for facebook the most. It is very simple to configure, works nice. The drawback is it is a bit heavy and it still does not support some modern facebook stuff (like opengraph, custom actions etc). But no doubt it is the best module regarding to Facebook, I have ever used.
Now comes the problem of using Drupal modules with Facebook. All of them I found uses PHP-sdk and is slow and not modern stuff friendly (reloads the page once the user is logged in etc.).
Now you have two choices,
1. if you are into programming or can hire one for this small task, create a small module (one javascript file and one php file, that's it) and be done with it. I have done that quite nicely, though it was my first drupal module. If you want I (and a lot of people) can help you with the coding part.
2. If you don't want that, go with drupal for facebook.

Facebook communication to Application

The start-up i currently work for is oriented around restaurant wait times. For our v1.25 specifications our clients -restaurants- that have Facebook pages want to be able to communicate to their app profile from their Facebook page.
The closest i have came to answering this question is the Graph API. However, the Graph API only allows us to read and write data to FB pages. So, is there a way for a restaurants FB page to write to its app profile? Secondly, Loso, whom we have modeled some of our designs from has this ability, does anyone have an idea as to how they have done it?
--Boris M.
Here is an option that you can consider...
When you are designing the app you can also develop a page tab to go with it...
You will find this option in the basic settings of the app.
You can make it to install for all first time users of your app, by getting a list of all his pages he created using that profile then install it on the one he selects.
This page tab when installed on a page will appears just where other tabs on the page appers(e.g. events, notes etc. occurs)
You can provide your required functionality on this tab as you like.
Thus the user can just select that tab on the page and use its functionality to post on the profile page of the app.
Hope this works for you... and also u can check out the jobcaster app it does something like that!