Prevent Deezer connection popup to show automatically - facebook

I am developing a deezer web application (javascript SDK).
I have a simple "hello world" player (example from the deezer dev website); if I start playing a song I can listen just to the 30 secs preview and it is correct, I am not connected to deezer.
What I want to avoid is the automatic deezer connection popup window which appears just after the music start playing. What I would like to do is instead explaining to the user why she has the 30 sec limit and invite her to connect her deezer account. That automatic popup is very very confusing for the average user. Is there a way to prevent it?
Furthermore: it is still not clear to me WHEN this popup is showed: if I am logged in facebook (not in deezer, just in facebook), the popup is showed, otherwise is not.
In order to do a test, I have DELETED my deezer account (which I registered through facebook) but it seems that when I am logged into facebook the Deezer SDK still remember me and launches the popup...
Does anyone has more information about?

There is no way to block that popup. It shows up every time a user needs to register/sign up to stream full tracks (usually after getting the 30 seconds previews). Credentials are cached so if the user is logged in Deezer from another browser window or previous navigation (on Deezer.com or any website using Deezer connect), it won't show up and those credentials will be used.
The only way you can be more proactive about the Deezer registration is to guide your user to your own login button (using DZ.login from the SDK) on your page before getting the popup.

Related

Facebook logout when not authorized

I'm building a public installation using an iPad, built as an iOS web app (using the "Add to Home Screen" functionality) which is going to allow users to share content on Facebook.
I'm currently logging the user in to Facebook and getting them to authorize my Facebook app when they click my custom share button. On a successful login, I open Facebook's Feed dialog and allow them to share. Once they have shared (or clicked cancel) I automatically log them out, making sure that the next user that uses the public installation won't be able to share to the previous user's Facebook account.
This all works well, but things get tricky if someone was to hit my custom share button, log in to Facebook and then not allow my app. This would mean that they have logged in, but as they haven't authorized the app, I don't have an access token, and so can't log them out (FB.logout() requires an access token).
Is there a way around this?
Or is there another way that I can log a user out?
Or is there a safe way to allow a user of a public installation (built in HTML) to share on Facebook and be automatically logged out afterwards? Would building a native obj-c app, and using Facebook's iOS SDK help?
The best I can think of is that if the user logs in but doesn't allow the application, they are told that they need to log out, and redirected to Facebook to be able to do this. However this offers them the chance to browse Facebook and (through shared links in their feed) the whole Internet - this isn't acceptable for our installation.
I solved this problem by creating a native iOS app, where the Facebook share link opened in it's own UIWebView. And once the sharing was complete, I deleted all session & cookie information, effectively logging the user out.

Can I post my own message in Facebook "Real Time App Activity" (apps ticker)?

Is it possible to post my own message and publish it on the app ticker whenever i want?
(Not talking about the general ticker on users feed, but the one you have when you enter an app)
For example: Every time a user logged in, facebook publish a message in app ticker (on the right) that the user started to play the app.
I believe what you're looking for is publishing an action.
For a high-level explanation: https://developers.facebook.com/docs/beta/opengraph/#news-feed
For the tutorial: https://developers.facebook.com/docs/beta/opengraph/tutorial/
You can set specific Open Graph actions for your application that will be viable to appear in the app ticker. I do not think there is anyway to FORCE facebook to display your action.
You can read more here about the Open Gaph Protocol.

How to relaunch an app like facebook-ios-sdk does?

Question:
I am actively looking in the source code on Github's facebook-ios-sdk project myself but I was wondering if anyone already knows how to relaunch an app that sent an iPhone user to Safari, such that the user can come back after some work has been finished?
Example:
When using facebook to login, the original app is relaunched after the facebook login page has authenticated the user.
Motivation:
I would like to be able to do the same for youtube videos without having to completely lose the user. I don't want to use the standard webview approach because I don't want to provide extra space to first let the video load for the user and then have the user click the play button. I want to skip the play button and its associated click entirely! Instead I want the user to be able to click on just an everyday regular iPhone button and be shown the video with the navigation for coming back to the app via relaunch.
You need your app to register a "custom URL scheme". Then get the callback in the remote web service to return a URL with that scheme. iOS will then launch your application.
More (somewhat old) info available here.
A list of common custom URL schems on iOS can be found here.
Generally, as part of the OAuth login process, you supply a callback URL as one of the paramaters. What this does, is tell the remote server (YouTube), that on successful authentication, redirect the user to the supplied URL. If YouTube supports this (does it support OAuth?) then on successful user login within safari, youtube will tell users safari to redirect to the supplied url. If this url is a "custom URL scheme" it will cause your app to relaunch and you can handle the situation from there.

Phonegap facebook API

I have installed the facebook API in phonegap but i have hard time making it work see link .The index.html file in the exemple folder has a login button that once taped opens the native facebook application on my device requiring email and password. After having authenticated me, it takes me back succesfully to my app.
Whenever i tap on the "getsession" button for exemple it shows me an alert saying "undefined". I want to know how to get the access token that is given right after the authentication process within my app and everything related to the session so i can perform other tasks?
Thank you

Is there a way to disable the "Please log in to continue" message in a Facebook Canvas app?

when you visit a Facebook Canvas app (such as http://apps.facebook.com/branchout/) and you are not logged in to Facebook, you will get the "Please log in to continue." dialog every 10 seconds or so.
I am planning to develop a Facebook Canvas app that does not ask for user authentication/ app authorization upfront (I don't want to scare users away), but I do not want to go that way if I cannot stop that dialog.
Is there any way to disable it, or should I rather ask for authentication/ authorization upfront? Thank you for sharing your experience.
Brent is right, it's just a bug. The what's-going-on pane on the right hand side tries to reload, and gets confused when there's no user logged in. Don't worry about it, it should be gone soon :-)
I'm pretty sure that is Facebook trying to refresh their ads. I've done a few apps that don't require authentication or login until specific actions are performed. If you are not logged into Facebook, then that prompt comes up. The only action I am performing is calling getLoginStatus on load. Unfortunately, it doesn't seem like there is any way around it. When I load my app directly (not in a Facebook iframe), the prompt doesn't come up.