Renatao Posted July 10, 2014 Report Share Posted July 10, 2014 Boa tarde a todos, Tenho o seguinte link http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Femottasistemas&width&layout=button&action=like&show_faces=true&share=true&height=80 que foi criado pelo pluguin do facebook no link https://developers.facebook.com/docs/plugins/like-button Ao carregar esse link direto no Internet Explorer ou qualquer outro navegador a opção 'Curtir' funciona normalmente. Ao carregar o mesmo link dentro de uma activex, carrega normalmente porém ao clicar no 'curtir' não funciona e nenhuma pagina é curtida A idéia é implementar a opção 'curtir' e 'compartilhar' dentro do sistema caso alguém já tenha passado por uma situação semelhante segue código de exemplo abaixo #include "FiveWin.ch" function ie() local oWnd, oWndChild, oActiveX local cEvents := "" DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MDI DEFINE WINDOW oWndChild MDICHILD OF oWnd oActiveX = TActiveX():New( oWndChild, "Shell.Explorer" ) oWndChild:oClient = oActiveX oWndChild:Resize() oActiveX:Do( "Navigate2", "https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Femottasistemas&width&layout=button&action=like&show_faces=false&share=true&height=35" ) oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) } ACTIVATE WINDOW oWnd ; VALID ( MemoEdit( cEvents ), .t. ) return nil function EventInfo( event, aParams, pParams, oActiveX ) local cMsg := "Event: " + cValToChar( event ) + CRLF local n cMsg += "Params: " + CRLF for n = 1 to Len( aParams ) cMsg += cValToChar( aParams[ n ] ) + CRLF next return cMsg + CRLF Abraços Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 10, 2014 Report Share Posted July 10, 2014 #include "FiveWin.ch" FUNCTION ie() local oWnd, oWndChild, oActiveX local cEvents := "" DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MDI DEFINE WINDOW oWndChild MDICHILD OF oWnd oActiveX = TActiveX():New( oWndChild, "Shell.Explorer" ) oWndChild:oClient = oActiveX oWndChild:Resize() oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) } ACTIVATE WINDOW oWnd ; ON INIT oActiveX:Do( "Navigate2", "https://pt-br.facebook.com" ) ; VALID ( MemoEdit( cEvents ), .t. ) RETURN NIL function EventInfo( event, aParams, pParams, oActiveX ) local cMsg := "Event: " + cValToChar( event ) + CRLF local n cMsg += "Params: " + CRLF for n = 1 to Len( aParams ) cMsg += cValToChar( aParams[ n ] ) + CRLF next return cMsg + CRLF Quote Link to comment Share on other sites More sharing options...
emotta Posted July 11, 2014 Report Share Posted July 11, 2014 Kapiaba, não é isso que ele precisa. Na verdade ele precisa que se abra o Internet Explorer dentro da Window da mesma forma que o Shell Explorer, pois o HTML que o face disponibiliza não funciona quando é o Shell Explorer e funciona quando é o Internet Explorer. Voce sabe como fazer isso? #include "FiveWin.ch" FUNCTION ie() local oWnd, oWndChild, oActiveX local cEvents := "" DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MDI DEFINE WINDOW oWndChild MDICHILD OF oWnd oActiveX = TActiveX():New( oWndChild, "Shell.Explorer" ) oWndChild:oClient = oActiveX oWndChild:Resize() oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) } ACTIVATE WINDOW oWnd ; ON INIT oActiveX:Do( "Navigate2", "https://pt-br.facebook.com" ) ; VALID ( MemoEdit( cEvents ), .t. ) RETURN NIL function EventInfo( event, aParams, pParams, oActiveX ) local cMsg := "Event: " + cValToChar( event ) + CRLF local n cMsg += "Params: " + CRLF for n = 1 to Len( aParams ) cMsg += cValToChar( aParams[ n ] ) + CRLF next return cMsg + CRLF Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 11, 2014 Report Share Posted July 11, 2014 Algo assim, Eduardo? #include "FiveWin.ch" FUNCTION Face2() static oWnd:=nil, oBar, oIe local i, cHtmlOrUrl cHtmlOrUrl := "https://pt-br.facebook.com" DEFINE WINDOW oWnd oIe = TActiveX():New( oWnd, "Shell.Explorer" ) oIe:Do( "Navigate2", cHtmlOrUrl ) oWnd:oClient = oIe ShowWindow(oWnd, 1 ) && 1=Show,0=hide oWnd:Center() ACTIVATE WINDOW oWnd MAXIMIZED sysrefresh() RETURN nil Abs, Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 11, 2014 Report Share Posted July 11, 2014 Veja se ajuda mais: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=12514&start=0&hilit=https+patrick abs, Quote Link to comment Share on other sites More sharing options...
emotta Posted July 11, 2014 Report Share Posted July 11, 2014 Kapiaba, ele precisa de algo igual o exemplo dele... Mas o navegador aberto tem que ser o Internet Explorer e não o Shell Explorer, que é muito limitado.. Em resumo teria apenas mudar o: oActiveX = TActiveX():New( oWndChild, "Shell.Explorer" ) para oActiveX = TActiveX():New( oWndChild, "InternetExplorer" ) O problema está nisso.... Como fazer? O Shell Explorer é muito limitado quanto a recursos HTML.... Algo assim, Eduardo? #include "FiveWin.ch" FUNCTION Face2() static oWnd:=nil, oBar, oIe local i, cHtmlOrUrl cHtmlOrUrl := "https://pt-br.facebook.com" DEFINE WINDOW oWnd oIe = TActiveX():New( oWnd, "Shell.Explorer" ) oIe:Do( "Navigate2", cHtmlOrUrl ) oWnd:oClient = oIe ShowWindow(oWnd, 1 ) && 1=Show,0=hide oWnd:Center() ACTIVATE WINDOW oWnd MAXIMIZED sysrefresh() RETURN nil Abs, Quote Link to comment Share on other sites More sharing options...
SAOliveira Posted July 12, 2014 Report Share Posted July 12, 2014 Veja se é perto disto. DEFINE DIALOG oDlgIE FROM 0,0 TO 700,1000 OF &(Arg1) PIXEL TITLE " ..:: Consulta ON-LINE base CEP dos correios ::.." oDlgIE:lHelpIcon:=.f. oActiveX:=TActiveX():New( oDlgIE, "Shell.Explorer",0,0,500,350 ) oDlgIE:oClient:=oActiveX ACTIVATE DIALOG oDlgIE CENTER ON INIT(oActiveX:Do( "Navigate","https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Femottasistemas&width&layout=button&action=like&show_faces=false&share=true&height=35")) Quote Link to comment Share on other sites More sharing options...
Renatao Posted August 12, 2014 Author Report Share Posted August 12, 2014 Veja se é perto disto. DEFINE DIALOG oDlgIE FROM 0,0 TO 700,1000 OF &(Arg1) PIXEL TITLE " ..:: Consulta ON-LINE base CEP dos correios ::.." oDlgIE:lHelpIcon:=.f. oActiveX:=TActiveX():New( oDlgIE, "Shell.Explorer",0,0,500,350 ) oDlgIE:oClient:=oActiveX ACTIVATE DIALOG oDlgIE CENTER ON INIT(oActiveX:Do( "Navigate","https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Femottasistemas&width&layout=button&action=like&show_faces=false&share=true&height=35")) É exatamente isso que preciso Sergio, porém na prática não funciona, se você tentar curtir a pagina do seu exemplo vai ver que não dá certo Se eu copiar o link https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Femottasistemas&width&layout=button&action=like&show_faces=false&share=true&height=35 e abrir direto no navegador ao clicar na opção 'curtir' funciona corretamente e a pagina é curtida no facebook No seu exemplo se eu clicar no botão 'curtir' a pagina não é curtida, ou seja não apresenta o mesmo funcionamento quando o link é aberto direto pelo navegador (IE) Abraço Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.