Solved

google picker popup --blocker

Posted on 2014-12-08
2
248 Views
Last Modified: 2014-12-13
Hello,
  I have implement the Google picker on my page. However, on the Iphone and other device the user need to  disable popup blocker on the browser.  Is there any method to bypass this manual setting

Here my code on the button click
 gapi.client.load('drive', 'v2', null);
            gapi.load('auth', { 'callback': onAuthApiLoad });
            gapi.load('picker');
            function onAuthApiLoad() {
                window.gapi.auth.authorize({
                    'client_id': data.clientID,
                    'immediate': false,
                    'scope': ['https://www.googleapis.com/auth/drive']
                }, handleAuthResult);
            }
 var oauthToken;
            function handleAuthResult(authResult) {
                if (authResult && !authResult.error) {
                    oauthToken = authResult.access_token;
                    createPicker();
                }
            }
            function createPicker() {
                var picker = new google.picker.PickerBuilder()
                    .addView(new google.picker.DocsView())
                    .setOAuthToken(oauthToken)
                    .setCallback(pickerCallback)
                    .build();
                picker.setVisible(true);
            }
function pickerCallback(data) {
            //function pickerCallback(data) {
                if (data.action == google.picker.Action.PICKED) {
                  
                    var doc = data.docs[0];
                    var fileId = doc.id;
                    var request = gapi.client.drive.files.get({
                        'fileId': fileId
                    });
                    request.execute(function (resp) {
                        var token = gapi.auth.getToken();
                       
                        var fileData = {
                            name: resp.title,
                            link: resp.downloadUrl,
                            accessToken: token.access_token,
                            tokenType: token.token_type,
                            mimeType: resp.mimeType
                        };
                    });
                }

Open in new window

0
Comment
Question by:SiemensSEN
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
Is there any method to bypass this manual setting

No, of course.
Maybe open in a css popup
0
 

Author Comment

by:SiemensSEN
Comment Utility
I see some sites like career builder.com that include drop box and they seems to have some method to work-a-round this issue
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now