Similar to our Twitter example, we'll be incorporating Facebook posts with a web popup as well:
In the
Chapter 9
folder, copy theFacebook Web Pop-Up
project folder to your desktop. All the configuration, libraries, and assets needed are already included. You can download the project files that accompany this book from the Packt Publishing website.Create a new
main.lua
file and save it to the project folder.Set the following variables at the beginning of the code:
display.setStatusBar( display.HiddenStatusBar ) local ui = require("ui") local openBtn local closeBtn local score = 100
Create a local function called
onOpenTouch()
with an event parameter. Add anif
statement when the event receives a"release"
action:local onOpenTouch = function( event ) if event.phase == "release" then
Add the following local variables that include the strings that we'll be implementing in the Facebook post:
local appId = "0123456789" -- Your personal FB App...