?
Solved

google picker popup --blocker

Posted on 2014-12-08
2
Medium Priority
?
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 40486789
Is there any method to bypass this manual setting

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

Author Comment

by:SiemensSEN
ID: 40497818
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…
Suggested Courses

765 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