Title: $return_args possibly adding escape slashes
Last modified: June 23, 2020

---

# $return_args possibly adding escape slashes

 *  Resolved [drea21](https://wordpress.org/support/users/drea21/)
 * (@drea21)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/return_args-possibly-adding-escape-slashes/)
 * Hello,
 * Amazing plugin, thank you for writing it. I was able to get a full implementation
   done to receive data and am working on a second one.
 * Specifically for Facebook Webhooks, I am trying to do the verify step. I am able
   to respond to the Facebook request, but it looks like $return_args is adding 
   additional backslashes to escape the string.
 * Here is a code sample:
 *     ```
       		if ($_GET['hub_challenge']) {	
       			$return_args = $_GET['hub_challenge'];
       			error_log(print_r($return_args, true));
       			return $return_args;
       		}
       ```
   
 * I can see in the error_log that the value I expect is correct for $return_args,
   but I think some processing happens after that because Facebook is showing me
   this:
 * > The URL couldn’t be validated. Response does not match challenge, expected 
   > value=”271718342″, received=”\”271718342\””
 * In my logs those \” are not there. Is there some processing that might be causing
   this?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Ironikus](https://wordpress.org/support/users/ironikus/)
 * (@ironikus)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/return_args-possibly-adding-escape-slashes/#post-13037657)
 * Hey [@drea21](https://wordpress.org/support/users/drea21/) – thank you a lot 
   for your message!
    This happens because you send over the data as a string instead
   of a JSON (return_args is usually an array).
 * To make it work, simply turn your variable from a string to an integer:
    `$return_args
   = intval( $_GET['hub_challenge'] );`
 * Hope this helps!
 *  Plugin Contributor [Ironikus](https://wordpress.org/support/users/ironikus/)
 * (@ironikus)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/return_args-possibly-adding-escape-slashes/#post-13255714)
 * Hey [@drea21](https://wordpress.org/support/users/drea21/) – I hope the solution
   we provided helped you. Since we haven’t heard back in a while, I’m going to 
   close this task.
    If you should have any further questions, feel free to let 
   us know at any time. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘$return_args possibly adding escape slashes’ is closed to new replies.

 * ![](https://ps.w.org/wp-webhooks/assets/icon-256x256.jpg?rev=2656397)
 * [WP Webhooks - Automate repetitive tasks by creating powerful automation workflows directly within WordPress](https://wordpress.org/plugins/wp-webhooks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-webhooks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-webhooks/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-webhooks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-webhooks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-webhooks/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ironikus](https://wordpress.org/support/users/ironikus/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/return_args-possibly-adding-escape-slashes/#post-13255714)
 * Status: resolved