Skip to content

Instantly share code, notes, and snippets.

View typeoneerror's full-sized avatar
🤠
iOS, Capacitor, Ember, Vue, Rails

Benjamin Borowski typeoneerror

🤠
iOS, Capacitor, Ember, Vue, Rails
View GitHub Profile
@typeoneerror
typeoneerror / facebook.dev
Created November 12, 2010 01:01
A snippet of some of the issues I've had so far on a single Facebook dev project. More when it's done.
edge.create events do not fire for comments:
http://github.com/facebook/connect-js/issues/#issue/82
bug with share UI:
Error: Permission denied for <http://static.ak.facebook.com> (document.domain=<http://facebook.com>) to get property Window.Arbiter from <https://www.facebook.com> (document.domain=<https://facebook.com>).
Source File: http://static.ak.facebook.com/connect/canvas_proxy.php#method=resize.ack&params=%7B%7D&relation=parent.frames%5Bf4ffd260f7d5d2%5D
Line: 90
http://forum.developers.facebook.net/viewtopic.php?pid=280935
<?php
function smarty_block_fbml($params, $content, &$smarty, &$repeat)
{
if (!$repeat && !empty($content))
{
$content = trim($content);
$output = <<<EOT
<fb:serverFbml>
<script type="text/fbml">
/**
* Determines if the device running this
* application is Game Center ready.
*
* @return true if Game Center is available.
*/
BOOL isGameCenterAvailable();
// get current achievement from array as a description
GKAchievementDescription *achievement = (GKAchievementDescription *)[self.achievementsList objectAtIndex:row];
// set the cell's text to the title
cell.textLabel.text = achievement.title;
// check to see if achievement has been completed
if ([self.achievements objectForKey:achievement.identifier])
{
// get the achievement from the dictionary using the identifier
GKAchievement *theAchievement = [self.achievements objectForKey:achievement.identifier];
- (void)loadAchievements
{
NSLog(@"loadAchievements");
[GKAchievement loadAchievementsWithCompletionHandler:^(NSArray *achievements, NSError *error) {
if (error != nil)
{
}
if (achievements != nil)
{
NSLog(@"Achievements loaded for player: %@", achievements);
$.fn.startWebkitAnimation = function(name)
{
var element = $(this);
if (!element.hasClass(name))
{
element.addClass(name);
}
else
{
element.css("-webkit-animation-name", "none");
<?php
//exit();
// path to web assets
define('PATH', realpath(dirname(__FILE__)));
// file to output manifest to
define('FILE_TO_WRITE', PATH . "/cache.manifest");
alias apachegraceful="sudo /usr/sbin/apache2ctl graceful"
alias apacherestart="sudo /etc/init.d/apache2 restart"
alias apachereload="sudo /etc/init.d/apache2 reload"
$.isMobileSafari = function(){return navigator.userAgent.match(/AppleWebKit\/(.*)Mobile\//);}
if ($.isMobileSafari())
{
$("#facebook").hide();
$(document).bind("touchstart", function()
{
$("#facebook").hide();
});
$(window).bind("scroll", function()
$.isMobileSafari = function(){return navigator.userAgent.match(/AppleWebKit\/(.*)Mobile\//);}
if ($.isMobileSafari())
{
$("#facebook").css("position", "absolute");
$.bindToBottom = function()
{
$("#facebook").css("top", (window.pageYOffset + window.innerHeight - 30) + 'px');
}
// sadly this does nothing as the pageYOffset is set