I
I
iLearner2011-12-20 13:42:20
Facebook
iLearner, 2011-12-20 13:42:20

Creation of pages in Facebook. Where to begin?

What can you advise to read / watch on creating Facebook pages for dummies. Interested in the very basics - opportunities, tools, tricks. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
Zerstoren, 2011-12-20
@Zerstoren

There are no tools. Only your knowledge of web technologies and server languages.
The only thing facebook will give you is information about the current user. You can see her.

function parse_signed_request($signed_request = false, $secret) {
  if( $signed_request === false )
        $signed_request = $_REQUEST['signed_request'];

  list($encoded_sig, $payload) = explode('.', $signed_request, 2);

  // decode the data
  $sig = base64_url_decode($encoded_sig);
  $data = json_decode(base64_url_decode($payload), true);

  if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
    error_log('Unknown algorithm. Expected HMAC-SHA256');
    return null;
  }

  // check sig
  $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
  if ($sig !== $expected_sig) {
    error_log('Bad Signed JSON signature!');
    return null;
  }

  return $data;
}

function base64_url_decode($input) {
  return base64_decode(strtr($input, '-_', '+/'));
}
$page = parse_signed_request(false , 'bd84f7d726a40620df9781d72ca67994' );

Пример на PHP
<source lang="php">
function parse_signed_request($signed_request = false, $secret) {
  if( $signed_request === false )
        $signed_request = $_REQUEST['signed_request'];

  list($encoded_sig, $payload) = explode('.', $signed_request, 2);

  // decode the data
  $sig = base64_url_decode($encoded_sig);
  $data = json_decode(base64_url_decode($payload), true);

  if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
    error_log('Unknown algorithm. Expected HMAC-SHA256');
    return null;
  }

  // check sig
  $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
  if ($sig !== $expected_sig) {
    error_log('Bad Signed JSON signature!');
    return null;
  }

  return $data;
}

function base64_url_decode($input) {
  return base64_decode(strtr($input, '-_', '+/'));
}
$page = parse_signed_request(false , 'Your_secret_code_application' );
var_dump($page);

And when creating pages, an iframe with a limited width of 520 pixels is used.
In addition, now Facebook has made a stupid system for adding tabs to a page. Therefore, a lot of mana becomes irrelevant on this issue. Here is my question from yesterday. habrahabr.ru/qa/14612/
There you will find the answer to the question of how to add your iframe application to the group.
Sorry for the long message)

Z
Zerstoren, 2011-12-20
@Zerstoren

Tabs are tabs on the groups page
. An iframe is just a page on your site.
It's better to experiment with test pages, a lot of things will become clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question