-4

Hi I use this code in php for check if fan page is liked using signed_request:

    private function parsePageSignedRequest()  
    { 
        if (isset($_REQUEST['signed_request']))  
        { 
            $encoded_sig = null; 
            $payload = null; 
            list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2); 
            $sig = base64_decode(strtr($encoded_sig, '-_', '+/')); 
            $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true)); 
            return $data; 
        } 
        return false; 
    } 

    function isLiked() 
    { 
        $signed_request = $this->parsePageSignedRequest(); 

        if($signed_request->page->liked)  
        { 
            return true; 
        } else { 
            return false;                 
        } 
    }  

how I can write this for python/django?

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
Chriss Mejía
  • 110
  • 1
  • 10

1 Answers1

0

i think you can use one of the following SDK's

python

django

Edo Post
  • 727
  • 7
  • 18