Wednesday, May 29, 2013

Re: Hi I am new here and I need some assistance

Hi

Really thanks, I will attempt this and I will keep you informed. 

Too many thanks

El martes, 28 de mayo de 2013 23:38:36 UTC-5, jeet bajaj escribió:
Hey Jose!

As you said your website is made up on CAKEPHP, then i will suggest to instead to placing the file you download from github "public_htm" directory.
You put those files in "\app\Vendor" folder. and remove the code whatever you have written in index.php. Beside this i will suggest to make a function in AppController.php file like


public function fbConnect() {
App::import('Vendor', 'src/facebook');
 $config = array( 'appId' => '291063454361392', 'secret' => 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' => false, // opcional ); $facebook = new Facebook($config); ?>
       
return $facebook;
}

I must help you.







On Tue, May 28, 2013 at 4:26 AM, Jose Antonio Amuchastegui <cju...@gmail.com> wrote:
HI

I am not a developer, I am trying to learn php and cakephp and now I am trying to set a facebook appi, multi friend request dialog. 

I have read dozens of tutorials, pages, facebook wiki, facebook documentation, so I am trying to follow the instructions I have gathered. 

1.- I have registered my facebook appi and get my appId and secret key. 
2.- Downloaded the github files: 

My site is based on cakephp, so everything is at public_html directory in my server. 

3.- Inside this public_html I create a directory named: php-sdk
4.- Inside I uploaded (ftp) the src file I downloaded from github
5.- Inside I created an index.php file: 

       <?php
    require_once("src/facebook.php");        $config = array(          'appId' => '291063454361392',          'secret' => 'a2cf7f82bb6e18bece7eef282d9f9ce7',          'fileUpload' => false, // opcional      );        $facebook = new Facebook($config); ?>

As I understood, this should let me use facebook sdk, so I went to my software.

Inside the page of my software (template_page_facebook) where I want to enable the Multi Friend Selector Dialog, I wrote this:

<HTML xmlns = "http://www.w3.org/1999/xhtml"    xmlns: fb = ""> INVITA A TODOS TUS AMIGOS EN FACEBOOK    <head>      <title> INVITA A TODOS TUS AMIGOS EN FACEBOOK </title>    </head>      <body>      <div id="fb-root"> </div>      <script src="http://connect.facebook.net/es_ES/all.js"> </script>        <h1>INVITA A TODOS TUS AMIGOS EN FACEBOOK</h1>        <button class="btn" id="send-to-many">Invitalos</button>        <script>   sendRequestToRecipients function () {  var user_ids = document.getElementsByName ("user_ids") [0] Valor.;  FB.ui ({method: 'apprequests',            message: 'Mi gran solicitud.'            a: 'user_ids',       }, Log.info.bind('send-to-many callback'));  }          FB.init ({      Id de aplicación: '291063454361392 ',      status: true, // comprobar estado de login      cookie: true, // habilitar cookies para permitir al servidor acceder a la sesión      sfbml: true, // ejecutar código XFBML      channel: true,      channelURL : 'http://www.mywebsite.com/channel.html', // fichero channel.html      oauth: true,      frictionlessRequests: true      init: true,      level: "debug",      signedRequest: null,      trace: false,      version: "mu",      viewmode: "website",      autorun: true        });      </script>    </body>  </Html>

Then, I created the channel diretory at public_html and inside is a file channel.html

The result is "error"

I have read everything, but as i am not developer I think there are multiple things I am doing wrong. I also have read: https://developers.facebook.com/blog/post/464/:


So, any body please can describe me what do I shall do??


Thanks



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+u...@googlegroups.com.
To post to this group, send email to cake...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: