2016-06-13 3 views
1

고객 로그인 페이지에 페이스 북 로그인이 있습니다. 맨 위로 링크 (customer.xml)에 추가 할 수 있다는 것을 알고 싶습니다. 당신은 이런 식으로 뭔가를 시도 할 수맨 위로 링크에 페이스 북 로그인 추가 Magento

<customer_logged_out> 
    <reference name="top.links"> 
     <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action> 
    </reference> 
    <reference name="top.links"> 
     <action method="addLink" translate="label title" module="customer"><label>FB Login</label><url>http:///facebook.com<!--https:///graph.facebook.com/oauth/authorize?client_id=125859627824349&redirect_uri=http%3A%2F%2Fe-japon.net%2Fsocialconnect%2Ffacebook%2Fconnect%2F&state=d68b9f71090209995a91a5cc1a0d2908&scope=public_profile%2Cemail%2Cuser_birthday--></url><title>FB Login</title><prepare/><urlParams/><position>100</position></action> 
    </reference> 
    <remove name="reorder"></remove> 
</customer_logged_out> 

감사합니다 =) app/design/frontend/your_interface/your_theme/layout/customer.xml를 들어

+1

이미 대답했다. 여기 [http://stackoverflow.com/a/37563142/3422696](http://stackoverflow.com/a/37563142/3422696) URL을 편집하십시오. –

답변

0

: 지금 여기 지침에 대한 코드의

<customer_logged_out> 
    <reference name="top.links"> 
     <action method="addLink" translate="label title" module="customer"> 
      <label>Log In</label> 
      <url helper="customer/getLoginUrl"/> 
      <title>Log In</title> 
      <prepare/> 
      <urlParams/> 
      <position>100</position> 
     </action> 
     <action method="addLink" translate="label title" module="customer"> 
      <label>FB Login</label> 
      <url><![CDATA[https:///graph.facebook.com/oauth/authorize?client_id=125859627824349&redirect_uri=http%3A%2F%2Fe-japon.net%2Fsocialconnect%2Ffacebook%2Fconnect%2F&state=d68b9f71090209995a91a5cc1a0d2908&scope=public_profile%2Cemail%2Cuser_birthday]]></url> 
      <title>FB Login</title> 
      <prepare/> 
      <urlParams/> 
      <position>100</position> 
     </action> 
    </reference> 
    <remove name="reorder"></remove> 
</customer_logged_out> 
+0

나는 이것을 시도했지만 데이터 (예 : 생일, 이메일 등)를 가져 오지 못했습니다. 성공적으로 로그인하지 않고 Magento 로그인 페이지로 돌아 왔습니다. –

+0

return facebook API는 무엇입니까? – Nolwennig

+0

당신의 도움에 감사드립니다 .... 코드를 가지고 –