Facebook – permission is reserved for apps that replicate the Facebook client on platforms without a native client

If you are getting an error from Facebook when applying for extended permission such as "user_groups" and u get the following error

The user_groups permission is reserved for apps that replicate the Facebook client on platforms without a native client. You can find more information here.

chances are you are pretty f**k up by Facebook. What does this means and what the hell is this? Google it around and i couldn't find a solution to this issue but at the end i manage to ask people in the Facebook Developers group and this is what i got.

@Credit to its respective @Andreas Teufel and @Christoph Broeckmann

Christoph Broeckmann If there is a device like say a mobile phone that does not have a native Facebook client, and you want to write one that brings FB functionality to that device, then your app can get that permission. Otherwise, it can’t.
Or to put it short: “Normal” apps will not get that permission granted.

and

Andreas Teufel ...or a TV, for example.

Putting it in short, if you are getting the error "permission is reserved for apps that replicate the Facebook client on platforms without a native client", the chances of you getting your permission approve because you need it for an app or website are pretty close to never.

This pretty much means that Facebook is trying very hard to protect its data and its platform by restricting your access to their data as much as possible. In that case, i really don't see how and why people will want to create a facebook app when they are kinda restricted in everything. And did you know if you read up their platform policy you'll find pretty interesting stuff to make you stop developing your facebook app almost immediately! Here's a little snippets,

Screen Shot 2014-07-15 at 5.33.34 PM

well, as you can see, its pretty disappointing looking at how much time you spend building an app with Facebook and get slap on your face when they decides to change their policy to protect their data! Guess, it's time to move on to other platform! ha!

Average website response time bash script

Ok i make a little bash script to test a particular website response time. This is done via the command line through a bash script. Anyway, here's the script code.

#!/bin/bash

CURL="/usr/bin/curl"
echo -n "Please pass the url you want to measure: "
read url
URL="$url"
count=1;
total_connect=0
total_start=0 
total_time=0
	echo " Time_Connect Time_startTransfer Time_total ";
while [ $count -le 100 ]
do
	result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL`
	echo $result;

	var=$(echo $result | awk -F":" '{print $1, $2, $3}')
	set -- $var

	total_connect=`echo "scale=2; $total_connect + $1"  | bc`;
	total_start=`echo "scale=2; $total_start + $2" | bc`;
	total_time=`echo "scale=2; $total_time + $3" | bc`;
	count=$((count+1))
done
echo "average time connect: `echo "scale=2; $total_connect/100" | bc`";
echo "average time start: `echo "scale=2; $total_start/100" | bc`";
echo "average time taken: `echo "scale=2; $total_time/100" | bc`";

What the above does is to prompt you for a url to test and run it for 100 times on your machine and print out the average response time from the website server to your machine.

Assuming you save the above file in 'shell', you will call the above script via 'bash ./shell' and it will prompt you for an url and start executing the url for 100 times and gives you an average response time.

P.S: the above script required you to install bc, you can install via yum install bc or sudo apt-get install bc 😉

(#100) The status you are trying to publish is a duplicate of, or too similar to, one that we recently posted to Twitter

This is the solutions to everyone out there that faces this error message. the solutions is copied from here getsatisfaction.com

If you go to
http://www.facebook.com/twitter
and remove the link to twitter from the affected wall (Click on "Unlink from Twitter"). Then you should be able to get the updates that previously failed, to your fan page again.

i don't take credit for this but its kind of hard to find this as well so here goes!

Iphone/Ipad number format css style change in safari

Here's something interesting yet simple to share for a long time. If you are wondering and debugging countless hours for a very simple thing such as color change on a number format in ipad or iphone, you might just arrived to the correct blog post. We all know that debugging CSS and HTML in ipad or iphone isn't an easy task although we can emulate the environment, there are certain things we cannot emulate such as the behavior of the ipad or iphone OS itself. Interestingly, a client of mine faced such issue with their website where his 'contact' number listed on his website was changed to blue instead of white as declared on the css file when view on ipad or iphone.

Now, the odd thing is that even the emulator is showing the colors correctly. Debugged for a few hours without any luck but notice that  whenever i added alphabet into the numbers, it changes back to the correct colors. I though it was some javascript but it wasn't. In the end, i disabled the whole CSS and notice something different on the emulator and the ipad. Weirdly, ipad and iphone treat numbers as a link because it can be a contact on safari. Therefore, it automatically  wrapped around a group of numbers with an anchor link on a web page.  Therefore, your CSS declaration have to write something like

.style{
color: blue
}

and added something like

.style, .style a{
color: blue
}

if you wish to cater to ipad or iphone on your website. Even if you do not have a mobile stylesheet, ipad or iphone will still behave this way. Therefore, for any group of numbers on your website, just take note of such behavior on mobile devices such as iphone or ipad.

“You do not have sufficient permissions to access this page.” Unable to access WordPress

Well, if you are unable to access your WordPress installation and received the message "You do not have sufficient permissions to access this page.", it is most likely that your WordPress installation, upgrading or migration has been screwed and the access of your user has all been lifted. In order to restore all these, you will need a bit of work to get it started again. However, there are still temporary solutions which you can undertake to make it work which doesn't completely solve your problem but temporary allow you to access WordPress. Just managed to get it working for a client so for all others who are seeking for a solutions as well, hope the tips help. Good Luck 🙂