Title: array_slice() expects parameter 1
Last modified: August 21, 2016

---

# array_slice() expects parameter 1

 *  [DarkoDonnie](https://wordpress.org/support/users/darkodonnie/)
 * (@darkodonnie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/)
 * Hi, first of all – Great Plugin!
 * Btw I have one problem, when trying to set the offset in shortcode, I’m getting
   this warning:
 * Warning: array_slice() expects parameter 1 to be array, object given in C:\wamp\
   www\bijujus\wp-content\plugins\kebo-twitter-feed\inc\shortcode.php on line 109
 * and also after that:
 * “Sorry, no Tweets were found.” message
 * But when switching offset to “off” it works like a charm?
 * [http://wordpress.org/plugins/kebo-twitter-feed/](http://wordpress.org/plugins/kebo-twitter-feed/)

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

 *  Plugin Author [Peter Booker](https://wordpress.org/support/users/peterbooker/)
 * (@peterbooker)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/#post-4448678)
 * Hi DarkoDonnie,
 * Sorry for the slow reply.
 * I have been working so hard on the next version, that I am slightly unfamiliar
   with the code now, I will take a look and see if I can work out why the Tweet
   data would not be in the format expected (array vs object).
 *  Thread Starter [DarkoDonnie](https://wordpress.org/support/users/darkodonnie/)
 * (@darkodonnie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/#post-4448731)
 * Hi Peter,
 * I was trying something like this:
    shortcode.php line 109
 * changed this:
    `$tweets = array_slice($tweets, $offset);`
 * to this:
 *     ```
       $tweets_arr = (array)$tweets;
        $tweets = (object)array_slice($tweets_arr, $offset);
       ```
   
 * now I’m not getting warning, but there is no tweets just the same message:
    Sorry,
   no Tweets were found.
 * maybe you can help me with this?
    Thanks
 *  Plugin Author [Peter Booker](https://wordpress.org/support/users/peterbooker/)
 * (@peterbooker)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/#post-4448765)
 * Hi DarkoDonnie,
 * Sorry for the slow reply, I have been ill for the past few days but I am starting
   to feel better and will start looking into this soon.
 *  Thread Starter [DarkoDonnie](https://wordpress.org/support/users/darkodonnie/)
 * (@darkodonnie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/#post-4448771)
 * No Worries,
    I managed to fix it, now everything works excellent, even with offset
   😉
 * One more time – thanks for this really nice plugin.

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

The topic ‘array_slice() expects parameter 1’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kebo-twitter-feed_00aced.svg)
 * [Kebo Twitter Feed](https://wordpress.org/plugins/kebo-twitter-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kebo-twitter-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kebo-twitter-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/kebo-twitter-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kebo-twitter-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kebo-twitter-feed/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [DarkoDonnie](https://wordpress.org/support/users/darkodonnie/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/array_slice-expects-parameter-1/#post-4448771)
 * Status: not resolved